$(function () { // 浜嬩欢 $(".zx_btm_o").click(function () { $(this).prev().toggleClass("zx_right"); }); // 杩斿洖椤堕儴 $('.p_backtop').removeClass("zx_hi"); $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.p_backtop').addClass("zx_hi"); } else { $('.p_backtop').removeClass("zx_hi"); } }); let llhei = $(document.body).height(); $('.p_backtop').click(function () { $('html ,body').animate({ scrollTop: 0 }, { duration:1200, easing:"easeInOutCubic" }); return false; }); $('.p_backbottom').click(function () { $('html ,body').animate({ scrollTop: llhei }, { duration:1200, easing:"easeInOutCubic" }); return false; }); // 娣诲姞绫诲悕 $(".zx_type").each(function () { var ttt = $(this).text(); $(this).parent().addClass("zx_" + ttt) }); // 鑾峰彇瀹㈡埛鍚嶇О骞惰ˉ鍏呭埌寮瑰嚭淇℃伅 $(".zx_haoname").each(function(){ let nametr = $(this).find("span").text(); $(this).next().next(".zx_xjie").find(".zx_zh").prepend("

" + nametr + "

") }); // 寰俊琛ュ厖淇℃伅 $(".zx_6").find(".zx_zh").prepend("

鎵竴鎵井淇′簩缁寸爜
鍏虫敞鎴戜滑鍔ㄦ€?/p>") $(".zx_6").find(".s_img").prepend("

寰俊浜岀淮鐮?/p>") }); $(document).ready(function(){ $("* img").attr({alt:"鎱堟邯甯傛鍑岀數瀛愭湁闄愬叕鍙?,title:"鎱堟邯甯傛鍑岀數瀛愭湁闄愬叕鍙?}); }); var windName = window.location.pathname; var time = setInterval(function () { var m = $(".p_navCon a").attr("href"); if (m) { console.log(m); $(".p_navCon a").each(function () { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('.p_navItem1').addClass("active") } }); clearInterval(time); } }, 100);