// javascript document // javascript document //鍏充簬鎴戜滑 $(window).scroll(function() { if(window.innerwidth > 640){ if ($(window).scrolltop() > 0) { $(".aboiutcontent").attr('id','tc1'); } else { $(".aboiutcontent").removeattr('id','tc1'); } }else{ $(".aboiutcontent").attr('id','tc1'); $(".aboiutcontent").each(function(){ var text=$(".aboiutcontent").text(); var len=text.length; console.log(text); if(len>200){ text = text.substring(0,199)+"..."; } $(".aboiutcontent").html(text); }); } }); //浜у搧 $(window).scroll(function() { if ($(window).scrolltop() > 775) { $(".cpright ul li:nth-child(1)").attr('id','atc1'); $(".cpright ul li:nth-child(2)").attr('id','atc2'); $(".cpright ul li:nth-child(3)").attr('id','atc3'); $(".cpright ul li:nth-child(4)").attr('id','atc4'); $(".cpright ul li:nth-child(5)").attr('id','atc5'); $(".cpright ul li:nth-child(6)").attr('id','atc6'); $(".cpright ul li:nth-child(7)").attr('id','atc7'); $(".cpright ul li:nth-child(8)").attr('id','atc8'); } else { $(".cpright ul li:nth-child(1)").removeattr('id','atc1'); $(".cpright ul li:nth-child(2)").removeattr('id','atc2'); $(".cpright ul li:nth-child(3)").removeattr('id','atc3'); $(".cpright ul li:nth-child(4)").removeattr('id','atc4'); $(".cpright ul li:nth-child(5)").removeattr('id','atc5'); $(".cpright ul li:nth-child(6)").removeattr('id','atc6'); $(".cpright ul li:nth-child(7)").removeattr('id','atc7'); $(".cpright ul li:nth-child(8)").removeattr('id','atc8'); } }); //鏂伴椈 $(window).scroll(function() { if ($(window).scrolltop() > 1499) { $(".newright ul li:nth-child(1)").animate({opacity:'1'},500); $(".newright ul li:nth-child(2)").animate({opacity:'1'},1000); $(".newright ul li:nth-child(3)").animate({opacity:'1'},1500); $(".newright ul li:nth-child(4)").animate({opacity:'1'},2000); } else { } }); //鏂伴椈 $(window).scroll(function() { if ($(window).scrolltop() > 1499) { $(".dianshi").attr('id','tc1'); } else { $(".dianshi").removeattr('id','tc1'); } }); //妗堜緥 $(window).scroll(function() { if ($(window).scrolltop() > 2500) { $(".anlimain ul li:nth-child(1)").attr('id','tc1'); $(".anlimain ul li:nth-child(2)").attr('id','tc2'); $(".anlimain ul li:nth-child(3)").attr('id','tc3'); $(".anlimain ul li:nth-child(4)").attr('id','tc4'); } else { $(".anlimain ul li:nth-child(1)").removeattr('id','tc1'); $(".anlimain ul li:nth-child(2)").removeattr('id','tc2'); $(".anlimain ul li:nth-child(3)").removeattr('id','tc3'); $(".anlimain ul li:nth-child(4)").removeattr('id','tc4'); } });