$(document).ready(function() { //pc导航 $(".menu .nLi ").hover(function () { $(this).find(".menu_2").stop().slideDown(100); }, function () { $(this).find(".menu_2").stop().slideUp(200); }) function navW(){ var liNum = $('.menu .nLi').length; $(".menu .nLi").width(100/liNum+'%'); } navW(); $("._aside .sidemenu li a").click(function () { $(this).parent().siblings().find("ul").slideUp()//如果要点击其他缩上去则增加这句 $(this).next("ul").slideToggle(300); $(this).parent().siblings().removeClass("current") $(this).parent().addClass("current") }) window.onload=function(){ function adap_box(selector,img_w,img_h,total_w){ var box_img=$(selector).find(".box_img img") var box_text=$(selector).find(".box_text") if(box_img.width()<=img_w && total_w != "0"){ box_text.width(total_w-box_img.width()) } else if(box_img.width()> img_w ){ box_img.width(img_w).height("auto").css("margin-top",(img_h-$(selector).find(".box_img img").height())*0.5) if(total_w != "0"){ box_text.width(total_w-img_w)}} } adap_box(".about",608,383,1120) $(".list_imagetext ul li").each( function(){ var wid1=$(this).find(".img_box img").width(); var wid2=$(this).width(); $(this).find(".text_box").width(wid2-wid1-11) } ) } $("#banner .slideBox").slide({mainCell:".bd ul",autoPlay:true, effect:"fold", trigger:"click",interTime:4000}); $(".bd li").each(function(i){ if($(".bd li").eq(i).find("img").width() > 640){ $(".bd li").eq(i).find("img").width("99%"); } }) jQuery(".slideBoxb").slide({ mainCell: ".bd ul", autoPlay: true, effect: "left" }); if($(".slideBoxb .bd ul li").length==1){ $(".prev,.next").hide() } if($("._aside ul.sidemenu > li").length==0){ $("._aside ul.sidemenu").hide() } jQuery(".pro_slide").slide({}); $(".about .box_text,.pro_leftt").addClass('fadeInLeft wow') $(".box_img,.pro_rightt").addClass('fadeInRight wow') //限制字符个数 // 兼容低版本IE $(function() { if (window.PIE) { $('.rounded').each(function() { PIE.attach(this); }); } }); //网页往下滑动效出现 new WOW().init(); });