if(window.location.protocol == "http:"){window.location.protocol="https:";} if(window.location.host == "wbcl.cn"){window.location.host="www.wbcl.com.cn";} if(window.location.host == "www.wbcl.cn"){window.location.host="www.wbcl.com.cn";} if(window.location.host == "wbcl.com.cn"){window.location.host="www.wbcl.com.cn";} // $(function(){ // new swiper ('.swiper-container', { // autoplay : 5000, // loop: true, // pagination: { // el: '.swiper-pagination', // }, // }) // }) //公司历史 轮播 $(function(){ if($(".chis").size() >= 1) { var swiperchis = new swiper(".chis .swiper-container",{ slidesperview:9 }); $(".chis .prev").on("click",function(){ swiperchis.swipeprev(); if(!$(".swiper-slide:has('.hover')").is(":first-child")) { var num = $(".swiper-slide:has('.hover')").index(); $(".swiper-slide .hover").removeclass("hover"); $(".swiper-slide").eq(num-1).find("a").addclass("hover"); $(".swiper-slide .hover").trigger("click"); } }); $(".chis .next").on("click",function(){ swiperchis.swipenext(); if(!$(".swiper-slide:has('.hover')").is(":last-child")) { var num = $(".swiper-slide:has('.hover')").index(); $(".swiper-slide .hover").removeclass("hover"); $(".swiper-slide").eq(num+1).find("a").addclass("hover"); $(".swiper-slide .hover").trigger("click"); } }); } }) //历史项目 $(function(){ if($(".hispli").size() >= 1) { var swiperhisp = new swiper(".hispli .swiper-container",{ slidesperview:3 }); $(".hispli .hpiprev").on("click",function(){ swiperhisp.swipeprev(); }) $(".hispli .hpinext").on("click",function(){ swiperhisp.swipenext(); }) if($(".hispli .swiper-slide").size() <= 3) { $(".hispli .hpiprev").hide(); $(".hispli .hpinext").hide(); } } }) //显示第一个 $(function(){ if($(".dspno").size() >= 1) { $(".dspno").eq(0).show(); } })