slide.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $(document).ready(function() {
  2. var mySwiper = new Swiper('.swiper-container',{
  3. calculateHeight:true,
  4. resizeReInit:true,
  5. pagination:".pagination",
  6. autoplay:5000,
  7. paginationClickable:true,
  8. loop: true,
  9. autoplayDisableOnInteraction:false
  10. });
  11. var myTeacher = new Swiper('.swiper-container2',{
  12. calculateHeight:true,
  13. resizeReInit:true,
  14. pagination:".pagination2",
  15. autoplay:5000,
  16. paginationClickable:true,
  17. loop: true,
  18. autoplayDisableOnInteraction:false
  19. });
  20. $(".select_box").click(function(event){
  21. event.stopPropagation();
  22. $(this).find(".option").toggle();
  23. $(this).parent().siblings().find(".option").hide();
  24. });
  25. $(document).click(function(event){
  26. var eo=$(event.target);
  27. if($(".select_box").is(":visible") && eo.attr("class")!="option" && !eo.parent(".option").length)
  28. $('.option').hide();
  29. });
  30. /*赋值给文本框*/
  31. $(".option a").click(function(){
  32. var value=$(this).text();
  33. $(this).parent().siblings(".select_txt").text(value);
  34. $("#select_value").val(value)
  35. })
  36. });