// javascript document $(function(){ /*10px = 0.1rem*/ var scale = $("body").width()/1920; $("html").css("font-size",100 * scale + 'px'); $(window).resize(function(){ var scale = $("body").width()/1920; $("html").css("font-size",100 * scale + 'px'); }); var resizetime; $(window).resize(function(){ clearinterval(resizetime); $("body").addclass("resizing"); resizetime = settimeout(function(){ $("body").removeclass("resizing"); clearinterval(resizetime); },1000); }); /*-- 顶部 --*/ }) /*--判断是否为ie9及以下版本--*/ function ie(fn){ if(navigator.useragent.indexof("msie")>0){ if( (navigator.useragent.indexof("msie 7.0")>0) || (navigator.useragent.indexof("msie 8.0")>0) ||(navigator.useragent.indexof("msie 9.0")>0 && !window.innerwidth) || (navigator.useragent.indexof("msie 9.0")>0)){ fn(); return true; } } } $(document).ready(function(){ $('.pagenav ul li a[href^="#"]').click(function(e){ e.preventdefault(); $('html, body').animate({scrolltop: ($(this.hash).offset().top-60)+"px"}, 1300); }); /* $(".navtit").click(function(){ $("#droplist").slidetoggle(200); })*/ $(".pagenav .navtit").click(function(){ var box_ = $(this).next("ul"); if (box_.is(":hidden")) { $(".pagenav ul").slidedown(); } else{ $(".pagenav ul").hide(); } }); if (!(/msie [6|7|8|9]/i.test(navigator.useragent))){ var wow = new wow({ boxclass: 'wow', animateclass: 'animated', offset: 100, mobile: true, live: true }); wow.init(); }; }); $(function() { $("body *").each(function() { $(this).attr("hsm") && $(this).addclass("animation") }); $(".hsms").each(function() { $(this).children().each(function(a) { $(this).css({ "animation-delay": a / 10 + "s" }) }) }); $(".tab-wrap .tab-head li").click(function() { $(this).addclass("cur").siblings().removeclass("cur"), $(this).parents(".tab-wrap").find(".tab-body").children("li").eq($(this).index()).addclass("cur").siblings("li").removeclass("cur") }); }); $(document).scroll(function() { if ($(this).scrolltop()>0) { $("header").addclass('bg'); }else { $("header").removeclass('bg'); } }); $("body").click(function() { $("html").removeclass("active"), $(this).find(".header-m").find(".nav").children("li").removeclass("active").find(".sub-nav").hide(), $(this).find(".main-nav-m").find("ul").slideup().siblings(".title").removeclass("active") }); $("body").children().click(function() {}); $(".m-menu-b").click(function() { return $("html").toggleclass("active"), $(".main-nav-m ul").hide(), $(".main-nav-m .title").removeclass("active"), !1 }); $(".header-m .nav li").each(function() { $(this).find("li").length > 0 && $(this).addclass("cur").children("a").attr("href", "javascript:;").click(function() { return $(this).siblings(".sub-nav").stop().slidetoggle().parent("li").toggleclass("active").siblings("li").removeclass("active").find(".sub-nav").stop().slideup(), !1 }) }); $(".main-nav-m .title").click(function() { return $(this).toggleclass("active").siblings("ul").stop().slidetoggle(), !1 }) $(".linka .navt2").hover(function(){ $(".linka").find(".navt2").removeclass("on"); $(this).addclass("on"); $(".selectcon2 .selectbox").removeclass("show"); $(".selectcon2 .selectbox").eq($(this).index()).addclass("show"); }) $(".selectcon2 .selectbox:not(.selectbox:first)").removeclass("show"); $('.honorlist').slick({slidestoshow: 1,slidestoscroll: 1,autoplay: true,autoplayspeed:3000}); $(".linka .navt1").hover(function(){ $(".linka").find(".navt1").removeclass("on"); $(this).addclass("on"); $(".selectcon1 .selectbox").removeclass("show"); $(".selectcon1 .selectbox").eq($(this).index()).addclass("show"); }) $(".selectcon1 .selectbox:not(.selectbox:first)").removeclass("show"); var pageliuyan = new swiper('.page-liuyanlist', { speed: 1000, slidesperview: 3, spacebetween:0, loop: true, preventintercationontransition: true, navigation: { nextel: '.liuyan-next', prevel: '.liuyan-prev', }, breakpoints: { 640: { slidesperview: 1, spacebetween: 0 }, 768: { slidesperview: 2, spacebetween: 0 } } }); var pagecomp = new swiper('.page-complist', { speed: 1000, slidesperview: 2, spacebetween:0, loop: true, autoplay: { delay: 3000, disableoninteraction: false, }, preventintercationontransition: true, navigation: { nextel: '.comp-next', prevel: '.comp-prev', }, breakpoints: { 768: { slidesperview: 1, spacebetween: 0 } } }); var pagecomp = new swiper('.page-comp2list', { speed: 1000, slidesperview: 1, spacebetween:0, loop: true, preventintercationontransition: true, navigation: { nextel: '.comp2-next', prevel: '.comp2-prev', }, }); var indexbnrswiper = new swiper('#index-bnr .swiper-container',{ speed:1000, loop:true, autoplay: { delay: 4000, stoponlastslide: false, disableoninteraction: true, }, pagination: { el: '#index-bnr .swiper-pagination', clickable: true, }, navigation: { nextel: '#index-bnr .swiper-button-next', prevel: '#index-bnr .swiper-button-prev', }, paginationclickable:true, autoplaydisableoninteraction:false }); /*web banner*/ var indexbnrswiper = new swiper('#web-bnr .swiper-container',{ speed:1000, autoplay: { delay: 4000, stoponlastslide: false, disableoninteraction: true, }, paginationclickable:true, pagination: { el: '#web-bnr .swiper-pagination', clickable: true, }, });