Guest User

Untitled

a guest
Oct 21st, 2019
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $( document ).ready(function() {
  2. //faq accordion
  3. const items = document.querySelectorAll(".accordion a");
  4.  
  5. function toggleAccordion(){
  6. this.classList.toggle('active');
  7. this.nextElementSibling.classList.toggle('active');
  8. }
  9.  
  10. items.forEach(item => item.addEventListener('click', toggleAccordion));
  11.  
  12.  
  13. // if less 991 disable hover
  14. if ($(window).width() < 991) {
  15. $(".image-1.img-zoom").removeClass("img-zoom");
  16. $(".image-2.img-zoom2").removeClass("img-zoom2");
  17. }
  18.  
  19. // videos accordion modal What Clam shelter is best for me??
  20.  
  21. $("#best-shelter").click(function(){
  22. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/KPw66H152wc?autoplay=1");
  23. $(".modal-title").text($(this).text());
  24. });
  25.  
  26. $("#best-popup").click(function(){
  27. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/bRsMaH41kq8?autoplay=1");
  28. $(".modal-title").text($(this).text());
  29. });
  30.  
  31. $("#tim-moore").click(function(){
  32. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/-Ed00BYxsXE?autoplay=1");
  33. $(".modal-title").text($(this).text());
  34. });
  35.  
  36. $("#keith-kavajecz").click(function(){
  37. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/RP-eTgPQeN8?autoplay=1");
  38. $(".modal-title").text($(this).text());
  39. });
  40.  
  41. $("#jarrid-houston").click(function(){
  42. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/S8frdPUNC5k?autoplay=1");
  43. $(".modal-title").text($(this).text());
  44. });
  45.  
  46. $("#pat-kalmerton").click(function(){
  47. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/8AgEno2b4iI?autoplay=1");
  48. $(".modal-title").text($(this).text());
  49. });
  50.  
  51. $("#Wittstruck-family").click(function(){
  52. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/FKYjZRAxRxY?autoplay=1");
  53. $(".modal-title").text($(this).text());
  54. });
  55.  
  56. $("#jeff-andersen").click(function(){
  57. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/DWNIqxgrvzI?autoplay=1");
  58. $(".modal-title").text($(this).text());
  59. });
  60.  
  61.  
  62. // Newsletter videos
  63.  
  64. $("#motion-float").click(function(){
  65. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/JLY0NI1qp54?autoplay=1");
  66. $(".modal-title").text($(this).text());
  67. });
  68.  
  69. $("#hub-shelters").click(function(){
  70. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/dwgIn5TPu1Y?autoplay=1");
  71. $(".modal-title").text($(this).text());
  72. });
  73.  
  74. //Clam Pro Tackle
  75. $("#frost-premium").click(function(){
  76. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/q9tRW314v1M?autoplay=1");
  77. $(".modal-title").text($(this).text());
  78. });
  79.  
  80. $("#pinhead").click(function(){
  81. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/E7qKI1kWPes?autoplay=1");
  82. $(".modal-title").text($(this).text());
  83. });
  84.  
  85. $("#small-pea").click(function(){
  86. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/cW7Asy-Pdqs?autoplay=1");
  87. $(".modal-title").text($(this).text());
  88. });
  89.  
  90. $("#super-leech").click(function(){
  91. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/Vv_ZdJvfzyc?autoplay=1");
  92. $(".modal-title").text($(this).text());
  93. });
  94.  
  95. $("#maki-plastics").click(function(){
  96. $("#video-player-modal").attr("src", "https://www.youtube.com/embed/Vv_ZdJvfzyc?autoplay=1");
  97. $(".modal-title").text($(this).text());
  98. });
  99.  
  100. var fishTrap = "https://www.youtube.com/embed/NOzIqSeXKw8?autoplay=1";
  101. $(".accordion .content p").click(function(){
  102. var pTagId = $(this).attr("id");
  103. console.log(pTagId);
  104. $(".modal-title").text($(this).text());
  105. VideoURL(fishTrap);
  106. });
  107.  
  108.  
  109. function VideoURL(youtubeID) {
  110. $("#video-player-modal").attr("src", youtubeID)
  111. }
  112.  
  113.  
  114.  
  115. // close modal stop video from playing
  116. $('#video-modal').on('hidden.bs.modal', function () {
  117. $("#video-player-modal").attr("src", "");
  118. });
  119. });
RAW Paste Data