$(function () { if ($(window).width() < 1004) { $('.newshow .content').find('img').css('width', '100%'); $('.newshow .content').find('img').css('height', 'auto'); } $('.withinnav span').on('touchend',function(){ if($('.withinnav ul').css('display')=='none'){ $('.withinnav ul').slidedown(); $(this).addclass('on'); }else{ $('.withinnav ul').slideup(); $(this).removeclass('on'); } }) //********************************************************** // var arr = ['123','3'] // for(var i = 0 ; i 50) { // $('.header_ind').removeclass('header_indtopa'); // } // }); //瀵艰埅 //棣栭〉鏂伴椈璧勮 $('.ind7nav li').each(function(i){ $(this).hover( function(){ $('.ind7nav li').removeclass('on'); $(this).addclass('on'); $('.ind7con .ind7list').hide(); $('.ind7con .ind7list').eq(i).show(); },function(){} ) }) $('.ind7nav li').each(function (i) { $(this).hover( function () { $('.ind7nav li').removeclass('on'); $(this).addclass('on'); $('.ind7conm .ind7list').hide(); $('.ind7conm .ind7list').eq(i).show(); }, function () { } ) }) //棣栭〉鐑鐞嗙郴缁? $('.ind4_nav .slick').each(function(i){ $(this).hover( function(){ $('.ind4_nav .slick').removeclass('nice'); $(this).addclass('nice'); $('.ind4con .content').hide(); $('.ind4con .content').eq(i).show(); },function(){} ) }) //鎵嬫満鑿滃崟 $('.menu').click(function(){ $('.navright').animate({right: "0",width:"100%"}, 500); $('.pagebg').fadein(500); }) //-- $('.navright').find('.closebtn').click(function(){ $('.navright').animate({right: "-100%",width:0}, 500); $('.pagebg').fadeout(500); }) //-- $('.pagebg').click(function(){ $('.searchlayertel').fadeout(500); $('.pagebg').fadeout(500); }) $('.m-navright .snavm').each(function(i){ $(this).find('.a').on('touchend',function(){ if($('.m-navright dl').eq(i).css('display')=='none'){ $('.m-navright dl').slideup(); $('.m-navright dl').eq(i).slidedown(); $('.m-navright .snavm').find('.a').removeclass('add'); $(this).addclass('add'); }else{ $('.m-navright .snavm').find('.a').removeclass('add'); $('.m-navright dl').slideup(); } }) }); //--杩斿洖椤剁 $(window).scroll(function(){ if ($(window).scrolltop()>200){ $('.top_btn').fadein(1500); }else{ $('.top_btn').fadeout(1500); } }); //褰撶偣鍑昏烦杞摼鎺ュ悗锛屽洖鍒伴〉闈㈤《閮ㄤ綅缃? $('.top_btn').click(function(){ $('body,html').animate({scrolltop:0},1000); return false; }); //-- var bolexec = false; if ($(".linenum").length > 0) { $(window).scroll(function () { var winheight = $(window).height() / 1.1; var current = $(".linenum").offset().top; if ($(document).scrolltop() > current / 3.8 && bolexec == false) { var line = $(".linenum"), len = line.length; line.each(function (index, element) { var t = $.trim($(this).text()).replace(" ", "").length; var text = ""; for (var j = 0; j < t; j++) text += 0; $(this).text(text); }); function animate(i) { if (i < len) { var _this = line.eq(i), a = 0, v = _this.attr("rel") - 0, _time = 100, vlen = (v + "").length; var t = setinterval(function () { a += 1; var pi = parseint(v / 100 * a); var text = ""; for (var j = 0; j < vlen - (pi + "").length; j++) text += 0; _this.text(text + pi); if (a == _time / 2) animate(i + 1); if (a >= _time) clearinterval(t); }, 1); } } animate(0); bolexec = true; } }) } })