$(function(){ // 投诉建议 $(".radioChoose_i").click(function(){ $(this).addClass("on").siblings().removeClass("on") }) // careers $(".careers_ul li .careersList_top").click(function () { $(this).parents("li").toggleClass("on").siblings("li").removeClass("on") $(this).siblings(".careersList_bot").slideToggle().parents("li").siblings("li").find(".careersList_bot").slideUp() }) //手机端swiper var phoneSwiper = new Swiper('.phoneSwiper .swiper-container',{ pagination: '.phoneSwiper .swiper-pagination', loop: true, // autoplay:5000, slidesPerView: "auto", centeredSlides:true, loopAdditionalSlides:100, spaceBetween: 5, paginationClickable :true, }) }) // 地图 function mapInt(mapTitle,mapAdress,mapx,mapy){ var map = new BMap.Map("map"); var point = new BMap.Point(mapx,mapy); var point2 = new BMap.Point(mapx,mapy); //坐标偏移 var point2 = new BMap.Point(mapx+0.05,mapy); var myIcon = new BMap.Icon("../images/map.png", new BMap.Size(44,64));// icon按钮 var marker2 = new BMap.Marker(point2,{icon:myIcon}); // 创建标注 map.addOverlay(marker2); // 将标注添加到地图中 map.centerAndZoom(point, 35); var opts = { width : 200, // 信息窗口宽度 height: 100, // 信息窗口高度 title : mapTitle // 信息窗口标题 } // var infoWindow = new BMap.InfoWindow(mapAdress, opts); // marker2.addEventListener("click", function(){ // map.openInfoWindow(infoWindow,point); // }); map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用 map.enableContinuousZoom(); //启用地图惯性拖拽,默认禁用 } $(function () { $(".case_show_s ").height($(".case_show_b").height()) $(".case_show_s .swiper-container").height($(".case_show_b").height() - 72) var _ind=0; var _len = $(".case_show_s .swiper-slide").length; var my_Swiper = new Swiper('.case_show_b .swiper-container',{ slidesPerView: 1,//设置slider容器能够同时显示的slides数量(carousel模式) spaceBetween: 0, noSwiping : true, prevButton:'.case_show_b .swiper-button-prev', nextButton:'.case_show_b .swiper-button-next', onInit: function(swiper){ // console.log(_ind) swiper.slideTo(_ind,1000) }, breakpoints:{ 767: { spaceBetween:0, // noSwiping : false, }, } }) var case_Swiper = new Swiper('.case_show_s .swiper-container',{ slidesPerView: 4,//设置slider容器能够同时显示的slides数量(carousel模式) spaceBetween: 2,//slide之间的距离(单位px)。 prevButton:'.case_show_s .swiper-button-prev', nextButton:'.case_show_s .swiper-button-next', noSwiping : true, direction:'vertical', breakpoints:{ 767: { spaceBetween:4 }, } }) $(".case_show_s .swiper-button-prev").addClass("disabled"); $(".case_show_s .swiper-button-prev").click(function(){ _ind--; btnJudge(); $(".case_show_s .swiper-slide").eq(_ind).addClass("on").siblings().removeClass("on"); my_Swiper.slideTo(_ind, 1000, false); }) $(".case_show_s .swiper-button-next").click(function(){ _ind++; btnJudge(); $(".case_show_s .swiper-slide").eq(_ind).addClass("on").siblings().removeClass("on"); my_Swiper.slideTo(_ind, 1000, false); }) $(".case_show_s .swiper-slide").click(function(){ $(this).addClass("on").siblings().removeClass("on"); _ind = $(this).index(); btnJudge(); my_Swiper.slideTo(_ind, 1000, false); }) $(".case_show_s .swiper-slide:eq(0)").click(); function btnJudge() { if(_ind >= _len - 1) { $('.case_show_s .swiper-button-next').addClass("disabled") _ind = _len - 1; } else { $('.case_show_s .swiper-button-next').removeClass("disabled") } if(_ind <= 0) { $(".case_show_s .swiper-button-prev").addClass("disabled") _ind = 0; } else { $(".case_show_s .swiper-button-prev").removeClass("disabled") } } if($(".case_show_s li").length>4){ $(".case_show_s .but").show(); } })