var header={ //打开搜索 opensearch:function(a,b,bclass,c){ $(a).click(function(e) { $(this).toggleclass("on"); $(b).toggleclass(bclass); $(document).on("click", function() { $(b).removeclass(bclass); $(a).removeclass("on"); }); e.stoppropagation(); }); $(c).on("click", function(e) { e.stoppropagation(); }); }, search:function(a,b,c,d){ $(a).jqsearch({ txtval: c, keytxt1: "输入关键词搜索!", keytxt2: "输入的关键词字数不要过多!", keytxt3: "您输入的内容存在特殊字符!", keyid: b, //输入框id keyurl: d, //跳转链接 keyhref: "key", //链接传值 static: false //是否静态站 }); }, searchen:function(a,b,c,d){ $(a).jqsearch({ txtval: c, keytxt1: "enter keywords to search!", keytxt2: "do not enter too many keywords!", keytxt3: "there are special characters in the content you entered!", keyid: b, //输入框id keyurl: d, //跳转链接 keyhref: "key", //链接传值 static: false //是否静态站 }); }, //导航栏下拉 navtop:function(){ $(".navtop li").each(function(){ var num=$(this).find(".sub a").length; if(num==0){ $(this).find(".sub").remove(); }else{ $(this).addclass("li_sub"); $(this).hover(function(){ $(this).toggleclass("hover"); $(this).find(".sub").stop(true,true).slidetoggle(); },function(){ $(this).removeclass("hover"); $(this).find(".sub").stop(true,true).slideup(); }) } }) $("#open_menu").click(function(e) { if ($(this).hasclass("open_menu_on")) { $(this).removeclass("open_menu_on") $(".header .navtop").removeclass("navtop_show"); } else { $(this).addclass("open_menu_on") $(".header .navtop").addclass("navtop_show"); } e.stoppropagation(); }); $(".header .navtop ul").click(function(e){ e.stoppropagation(); }); $(document).on("click",function(){ $("#open_menu").removeclass("open_menu_on") $(".header .navtop").removeclass("navtop_show"); }) } } var home={ //首页banner hban:function(){ $('.hbanner .ul').slick({ dots: true, speed: 500, arrows: false, infinite: false, fade: true, autoplay: true, }); }, hbox:function(){ //新闻资讯 $('.hnews .piclist .ul').slick({ dots: true, speed: 500, arrows: false, infinite: false, fade: true, autoplay: true, }); }, } var footer={ box:function(){ $(document).on('mouseenter','.footer .share a',function(){ $(this).find('figure').stop(true,true).slidedown(); }); $(document).on('mouseleave','.footer .share a',function(){ $(this).find('figure').stop(true,true).hide(); }); } } var main={ hn:function(){ $(".all-h1").remove(); }, //我们的业务 proindex:function(){ $('.proindex .list .ul').slick({ dots: true, speed: 500, arrows: true, infinite: false, slidestoshow: 3, slidestoscroll: 4, responsive: [ { breakpoint: 769, settings: { slidestoshow: 2, slidestoscroll: 2 } } ] }); //滚动效果 $('.righinfo001774 .big .slider').slick({ fade: true, asnavfor: '.righinfo001774 .small .slider', infinite: false, appendarrows: $(".righinfo001774 .small .btn"), }); $('.righinfo001774 .small .slider').slick({ slidestoshow: 5, arrows: false, infinite: false, asnavfor: '.righinfo001774 .big .slider', focusonselect: true, responsive: [{ breakpoint: 768, settings: { slidestoshow: 3 } }] }); }, //菜单描点 menufixed:function(n){ $(window).scroll(function(){ var mt=$(".promenu").offset().top var dt=$(document).scrolltop(); $(".fixeditem").each(function(){ var th=$(this).offset().top - $(".header").outerheight()-30 if(dt >=th){ var id=$(this).data("id") $(".promenu li[data-id="+id+"]").addclass("active_on").siblings().removeclass("active_on"); } }); }); $(".promenu li").click(function(){ var id=$(this).data("id"); if(id==0){ $('body,html').animate({scrolltop:$(".header").offset().top-30},300) } else{ $(this).addclass("active_on").siblings().removeclass("active_on"); var offh=$(".fixeditem[data-id="+id+"]").offset().top - $(".header").outerheight()// - 10 $('body,html').animate({scrolltop:offh},300) return false; } }); var navid=n; if(navid!=''){ $(".promenu li[data-id="+navid+"]").click(); } }, //企业文化 culturelist:function(){ $('.culturelist .ul').slick({ dots: true, speed: 500, arrows: false, infinite: false, slidestoshow: 3, slidestoscroll: 3, responsive: [ { breakpoint: 769, settings: { slidestoshow: 2, slidestoscroll: 2, } }, { breakpoint: 640, settings: { slidestoshow: 1, slidestoscroll: 1, } } ] }); } } var home={ box:function(){ $(".htop").hide(); var flag = false; var flagindex = false; var index = 0; $('#fullpage').fullpage({ responsivewidth: 1025, afterload: function (anchorlink, index) { // if (index.index == 0) { // flag = true // $('.hbanner .counter').countup(); // } // if (index.index == 1) { // flag = true // $('.habout .counter').countup(); // } } }) document.queryselector('#topback').addeventlistener('click', function(e){ e.preventdefault(); flagindex = false; fullpage_api.moveto(1, 0); }); $(".hpro .imgbg .ul").slick({ arrows: true, slidestoscroll: 1, autoplay: true, autoplayspeed: 4000, infinite: false, dots: false, fade: true, appendarrows:'.hpro .btn', }); $('.hpro .list .ul').slick({ dots: false, speed: 500, arrows: false, infinite: false, slidestoshow: 1, rows:4, }); $('.hother .list .ul').slick({ dots: false, speed: 500, arrows: true, infinite: true, slidestoshow: 4, responsive: [ { breakpoint: 1201, settings: { slidestoshow: 3, } }, { breakpoint: 769, settings: { slidestoshow: 2, } }, { breakpoint: 640, settings: { slidestoshow: 1, } } ] }); } }