From bc3d8b9c9a20e4ef8605c23a97539ba7b44d3328 Mon Sep 17 00:00:00 2001 From: Josh Oakes Date: Tue, 7 Jan 2025 16:05:08 -0600 Subject: [PATCH] KAD-3331 Video popup not re-init on ql filter --- includes/assets/js/kb-glight-video-pop-init.min.js | 2 +- src/assets/js/kb-glight-video-pop-init.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/assets/js/kb-glight-video-pop-init.min.js b/includes/assets/js/kb-glight-video-pop-init.min.js index 5377ab928..9c2a75077 100644 --- a/includes/assets/js/kb-glight-video-pop-init.min.js +++ b/includes/assets/js/kb-glight-video-pop-init.min.js @@ -1 +1 @@ -(function(){"use strict";var a={cache:[],wrapper:[],trigger:[],initAll(){const b=["zoom","zoomBack","fade","slide","slideBack","flip","none"];a.cache=document.querySelectorAll(".kadence-video-popup-link");for(let e=0;e{const a=document.getElementById("glightbox-body");h&&a&&(a.classList="",a.classList.add("glightbox-container"),a.classList.add("glightbox-kadence-dark"),a.classList.add(h))}),a.on("slide_after_load",a=>{const b=a.slideConfig.href.match(/^(.*vimeo.com\/|.*video\/)?(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);if(b){const c=a.slideNode.querySelector("iframe");c.src=c.src+"&h="+b[b.length-1]}})}}},init(){if("function"==typeof GLightbox)a.initAll();else var b=setInterval(function(){"function"==typeof GLightbox&&(a.initAll(),clearInterval(b))},200)}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a.init):a.init()})(); \ No newline at end of file +(function(){"use strict";var a={cache:[],wrapper:[],trigger:[],initAll(){const b=["zoom","zoomBack","fade","slide","slideBack","flip","none"];a.cache=document.querySelectorAll(".kadence-video-popup-link");for(let e=0;e{const a=document.getElementById("glightbox-body");h&&a&&(a.classList="",a.classList.add("glightbox-container"),a.classList.add("glightbox-kadence-dark"),a.classList.add(h))}),a.on("slide_after_load",a=>{const b=a.slideConfig.href.match(/^(.*vimeo.com\/|.*video\/)?(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);if(b){const c=a.slideNode.querySelector("iframe");c.src=c.src+"&h="+b[b.length-1]}})}}},init(){if("function"==typeof GLightbox)a.initAll();else var b=setInterval(function(){"function"==typeof GLightbox&&(a.initAll(),clearInterval(b))},200)}};"loading"===document.readyState?(document.addEventListener("DOMContentLoaded",a.init),document.addEventListener("kb-query-loaded",a.init)):a.init()})(); \ No newline at end of file diff --git a/src/assets/js/kb-glight-video-pop-init.js b/src/assets/js/kb-glight-video-pop-init.js index b957d552e..f884ad277 100644 --- a/src/assets/js/kb-glight-video-pop-init.js +++ b/src/assets/js/kb-glight-video-pop-init.js @@ -150,6 +150,7 @@ if ('loading' === document.readyState) { // The DOM has not yet been loaded. document.addEventListener('DOMContentLoaded', kadenceBlocksProVideoLightbox.init); + document.addEventListener('kb-query-loaded', kadenceBlocksProVideoLightbox.init); } else { // The DOM has already been loaded. kadenceBlocksProVideoLightbox.init();