12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- var hx = "";
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx1.jpg" alt=""></a></li>';
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx2.jpg" alt=""></a><</li>';
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx3.jpg" alt=""></a><</li>';
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx4.jpg" alt=""></a><</li>';
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx5.jpg" alt=""></a><</li>';
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx6.jpg" alt=""></a><</li>';
- hx +='<li class="swiper-slide"><a href="/house/housetype/6008/"><img src="/zt/zizaicheng20190305/image/hx7.jpg" alt=""></a><</li>';
- var ybj = "";
- ybj +='<li class="swiper-slide"><a href="/house/album/6008/"><img src="/zt/zizaicheng20190305/image/ybj1.jpg" alt=""></a><</li>';
- ybj +='<li class="swiper-slide"><a href="/house/album/6008/"><img src="/zt/zizaicheng20190305/image/ybj2.jpg" alt=""></a><</li>';
- ybj +='<li class="swiper-slide"><a href="/house/album/6008/"><img src="/zt/zizaicheng20190305/image/ybj3.jpg" alt=""></a><</li>';
- ybj +='<li class="swiper-slide"><a href="/house/album/6008/"><img src="/zt/zizaicheng20190305/image/ybj4.jpg" alt=""></a><</li>';
- $('.Plan_xc_title p').on('click',function(){
-
- var dataid = $(this).attr('data-type');
-
- $(this).attr('class','on').siblings().attr('class','');
- switch(dataid)
- {
- case '2':
- $('.Plan_xclb_box').html('<div class="Plan_xclb swiper1"><ul class="swiper-wrapper">'+hx+'</ul><div class="swiper-button-prev" id="prev"></div><div class="swiper-button-next" id="next"></div><div class="swiper-pagination"></div></div>');
- break;
- case '3':
- $('.Plan_xclb_box').html('<div class="Plan_xclb swiper1"><ul class="swiper-wrapper">'+ybj+'</ul><div class="swiper-button-prev" id="prev"></div><div class="swiper-button-next" id="next"></div><div class="swiper-pagination"></div></div>');
- break;
- }
- var mySwiper3= new Swiper(".swiper1",{
- loop : false,
- loopedSlides:4,
- // pagination: '.swiper-pagination',
- autoplayDisableOnInteraction : false,
- slidesPerView :"auto",
- // 如果需要前进后退按钮
- nextButton: '.swiper-button-next',
- prevButton: '.swiper-button-prev',
- paginationType : 'fraction',
- pagination: '.swiper-pagination',
- paginationFractionRender: function (swiper, currentClassName, totalClassName) { //图片数量
- return '<span class="' + currentClassName + '"></span>' +
- ' / ' +
- '<span class="' + totalClassName + '"></span>';
- },
- });
-
- })
- $('.Plan_xc_title > p').eq(0).click(); //默认点击第一个
|