$(document).ready(function(){ /*棣栭〉*/ function adhr(adhrs){ $(adhrs).hover(function(){ $(this).addClass("act"); },function(){ $(this).removeClass("act"); }) } function infc(infcs){ $(infcs).focus(function(){ $(this).addClass("act"); }) } function inbu(inbus){ $(inbus).blur(function(){ $(this).removeClass("act"); }) } var re=function(){ var hd=parseInt($(window).height()); var wd=parseInt($(window).width()); $(".banner-wap").css({height:(hd-50)+"px"}); if(parseInt($(window).width())>1000){ $(".hd-wap-nav").css({display:"none"}); $(".hc-cz p").removeClass("act").addClass("horx-ns"); $(".section-wrap").css({height:hd+"px"}); $(".banner").css({height:hd+"px"}); $(".hdrn-nav").stop().animate({marginTop:-$(".hdrn-nav").height()/2},100); $(".ih-wk").stop().animate({marginTop:-$(".ih-wk").height()/2,marginLeft:-($(".ih-wk").width()-85)/2},100); $(".ik-wk").stop().animate({marginTop:-$(".ik-wk").height()/2,marginLeft:-($(".ik-wk").width()-85)/2},100); }else{ $(".section-wrap").css({height:"auto"}); $(".banner").css({height:"auto"}); $(".hdrn-nav").stop().animate({marginTop:-$(".hdrn-nav").height()/4*3},100); $(".ih-wk").stop().animate({marginTop:0,marginLeft:0},100); $(".ik-wk").stop().animate({marginTop:0,marginLeft:0},100); } if(parseInt($(window).width())>1300){ $(".in-wk").stop().animate({marginTop:-$(".in-wk").height()/2,marginLeft:-($(".in-wk").width()-85)/2},100); }else{ $(".in-wk").stop().animate({marginTop:0,marginLeft:0},100); } if ($(window).width()>=1000) { if(!$($("body").hasClass("ny-js"))){ $(".i-lista .list-box .p-text .p").mCustomScrollbar({ }); } $(".i-lista .ul .li").hover(function(){ if ($(this).hasClass("active") && $(window).width()>=1000) { }else{ var k = $(this).index(); $(".list-box").stop(true,true).fadeIn(); $(this).addClass("active").siblings().removeClass("active"); $(".list-box").find(".list").eq(k).addClass("active").siblings().removeClass("active"); $(".i-lista .ul").hover(function(){ $(".list-box").stop(true,true).fadeIn(); $(".i-banner").addClass("cur"); },function(){ $(".i-lista .ul .li").removeClass("active"); $(".list-box").stop(true,true).fadeOut(); $(".i-banner").removeClass("cur"); }) } }) //banner涓嬫诞鍧 var n =$(".i-banner .swiper-pagination").length; var nz =($(".i-banner .swiper-pagination").height()); var Top_center = -(nz/1) $(".i-banner .swiper-pagination").css('margin-top',Top_center); }else{ $(".i-lista .list-box .p-text").height("auto"); $(".i-lista .ul .li").on('click',function(){ var k = $(this).index(); //$(this).parents(".ul").find(".list-box").height($(".list-box .list").eq(k).height()); }) $(".i-lista .ul .li").on("click",function(){ if ($(this).hasClass("active")) { $(this).removeClass("active"); //$(".list-box").fadeOut(); }else{ var k = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".list-box").find(".list").eq(k).addClass("active").siblings().removeClass("active"); $(".list-box").fadeIn(); } }) $(".i-lista .ul .li").eq(0).click(); //$(".i-lista .ul .li").parents(".ul").find(".list-box").height($(".list-box .list").eq(0).height()); } } re(); $(window).resize(function(){ re();}); $(".hc-wh").hover(function(){ $(this).find("p").stop().animate({top:"-71px",height:"150px"},300); },function(){ $(this).find("p").stop().animate({top:"0",height:0},300); }) $(".hc-form").hover(function(){ $(this).find("p").stop().animate({top:"-10px",height:"50px"},100); },function(){ $(this).find("p").stop().animate({top:"0",height:0},100); }) $(".hc-form p input.fl").focus(function(){ $(".hc-form p").addClass("act"); }) $(".hc-form p input.fl").blur(function(){ $(".hc-form p").removeClass("act"); }) $("div.hdrn-nav .hdrnn").hover(function(){ if(!$(this).find(".hdrnn-title a").hasClass("act")){ $(".hdrnn-title a").removeClass("act"); $(".hdrnn-list").slideUp(500); $(this).find(".hdrnn-title a").addClass("act"); $(this).find(".hdrnn-list").filter(':not(:animated)').slideDown(500); } }) $(".hc-cz p").click(function(){ if(parseInt($(window).width())>1000){ if($(this).hasClass("act")){ $(this).removeClass("act").addClass("horx-ns"); $("div.hdrn-nav .hdrnn").removeClass("cur"); $(".hd-rs").stop().animate({left:"84px",width:"0"},600); }else{ $(this).addClass("act").removeClass("horx-ns"); $(".hd-rs").stop().animate({left:"85px",width:"100%"},600,function(){ $("div.hdrn-nav .hdrnn").addClass("cur"); }); } }else{ if($(this).hasClass("act")){ $(this).removeClass("act").addClass("horx-ns"); $(".hd-wap-nav").slideUp(200); $(".hwn").removeClass("hwn-zksjs"); }else{ $(this).addClass("act").removeClass("horx-ns"); $(".hd-wap-nav").filter(':not(:animated)').slideDown(300); $(".hwn").addClass("hwn-zksjs"); } } }) $(".hdrn-off,.hdr-yy").click(function(){ $(".hc-cz p").removeClass("act").addClass("horx-ns"); $("div.hdrn-nav .hdrnn").removeClass("cur"); $(".hd-rs").stop().animate({left:"84px",width:"0"},600); }) $(".ik-bt .swiper-slide").hover(function(){ $(this).find(".ikb-title i").stop().animate({width:$(this).find(".ikb-title span em").width()},400); },function(){ $(this).find(".ikb-title i").stop().animate({width:"40px"},400); }) $(".in-bt .gallery-thumbs .inbtp").hover(function(){ $(this).siblings(".inbtp").find("p").stop().animate({width:0},200); $(this).find("p").stop().animate({width:"100%"},200); $(".in-bt .gallery-top .inbtpk").removeClass("aptx"); $(".in-bt .gallery-top .inbtpk").eq($(this).index()).addClass("aptx"); }) $(document).on("mousewheel DOMMouseScroll", function (e) { var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie (e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox if (delta > 0) { // 鍚戜笂婊 var dshg0=parseInt($(".ft").css("bottom")); var dshg1=parseInt($(".section-wrap").css("bottom")); if(dshg0==0&&dshg1==312){ $("ul.hc-pos li").eq($("ul.hc-pos li").length-1).click(); } } else if (delta < 0) { // 鍚戜笅婊 } }); setTimeout(function(){ $(".index-load").addClass("active"); $(".index-warp").addClass("active"); $(".section-wrap").addClass("put-section-0"); },2200) $(".hwn-show").click(function(){ if($(this).hasClass("act")){ $(this).removeClass("act"); $(this).siblings(".hwn-hide").slideUp(200); }else{ $(".hwn-show").removeClass("act"); $(".hwn-hide").slideUp(200); $(this).addClass("act"); $(this).siblings(".hwn-hide").filter(':not(:animated)').slideDown(300); } }) /*棰嗗鍏虫€€*/ var page=2; $('.icon-show').click(function(){ var $this=$(this); $.post(root+"/H/Ajax/guanhuai",{page:page},function(data){ if(data.status=='1'){ $('.lxn-list').append(data.data); page++; if(page>$this.attr('page')){ $this.remove(); } } },"json"); }); })