Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( document ).ready(function() {
- //faq accordion
- const items = document.querySelectorAll(".accordion a");
- function toggleAccordion(){
- this.classList.toggle('active');
- this.nextElementSibling.classList.toggle('active');
- }
- items.forEach(item => item.addEventListener('click', toggleAccordion));
- // if less 991 disable hover
- if ($(window).width() < 991) {
- $(".image-1.img-zoom").removeClass("img-zoom");
- $(".image-2.img-zoom2").removeClass("img-zoom2");
- }
- // videos accordion modal What Clam shelter is best for me??
- $("#best-shelter").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/KPw66H152wc?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#best-popup").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/bRsMaH41kq8?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#tim-moore").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/-Ed00BYxsXE?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#keith-kavajecz").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/RP-eTgPQeN8?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#jarrid-houston").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/S8frdPUNC5k?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#pat-kalmerton").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/8AgEno2b4iI?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#Wittstruck-family").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/FKYjZRAxRxY?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#jeff-andersen").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/DWNIqxgrvzI?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- // Newsletter videos
- $("#motion-float").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/JLY0NI1qp54?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#hub-shelters").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/dwgIn5TPu1Y?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- //Clam Pro Tackle
- $("#frost-premium").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/q9tRW314v1M?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#pinhead").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/E7qKI1kWPes?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#small-pea").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/cW7Asy-Pdqs?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#super-leech").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/Vv_ZdJvfzyc?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- $("#maki-plastics").click(function(){
- $("#video-player-modal").attr("src", "https://www.youtube.com/embed/Vv_ZdJvfzyc?autoplay=1");
- $(".modal-title").text($(this).text());
- });
- var fishTrap = "https://www.youtube.com/embed/NOzIqSeXKw8?autoplay=1";
- $(".accordion .content p").click(function(){
- var pTagId = $(this).attr("id");
- console.log(pTagId);
- $(".modal-title").text($(this).text());
- VideoURL(fishTrap);
- });
- function VideoURL(youtubeID) {
- $("#video-player-modal").attr("src", youtubeID)
- }
- // close modal stop video from playing
- $('#video-modal').on('hidden.bs.modal', function () {
- $("#video-player-modal").attr("src", "");
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement