qygg_zt.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. var xgt = "";
  2. xgt +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/xgt1.png" alt=""></li>';
  3. xgt +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/xgt2.png" alt=""></li>';
  4. var hx = "";
  5. hx +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/hx1.png" alt=""></li>';
  6. hx +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/hx2.png" alt=""></li>';
  7. hx +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/hx3.png" alt=""></li>';
  8. hx +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/hx4.png" alt=""></li>';
  9. hx +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/hx5.png" alt=""></li>';
  10. hx +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/hx6.png" alt=""></li>';
  11. var ybj = "";
  12. ybj +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/ybj1.png" alt=""></li>';
  13. ybj +='<li class="swiper-slide"><img src="/zt/qygg_zt20190226/image/ybj2.png" alt=""></li>';
  14. $('.Plan_xc_title p').on('click',function(){
  15. var dataid = $(this).attr('data-type');
  16. $(this).attr('class','on').siblings().attr('class','');
  17. switch(dataid)
  18. {
  19. case '1':
  20. $('.Plan_xclb_box').html('<div class="Plan_xclb swiper1"><ul class="swiper-wrapper">'+xgt+'</ul></div>');
  21. break;
  22. case '2':
  23. $('.Plan_xclb_box').html('<div class="Plan_xclb swiper1"><ul class="swiper-wrapper">'+hx+'</ul></div>');
  24. break;
  25. case '3':
  26. $('.Plan_xclb_box').html('<div class="Plan_xclb swiper1"><ul class="swiper-wrapper">'+ybj+'</ul></div>');
  27. break;
  28. }
  29. var mySwiper3= new Swiper(".swiper1",{
  30. loop : false,
  31. loopedSlides:4,
  32. // pagination: '.swiper-pagination',
  33. autoplayDisableOnInteraction : false,
  34. slidesPerView :"auto"
  35. });
  36. })
  37. $('.Plan_xc_title > p').eq(0).click(); //默认点击第一个