window.addEventListener("load", function () { const urlParams = new URLSearchParams(window.location.search); const tabIndex = urlParams.get("tab"); if (tabIndex === null) return; function clickTab() { const tabs = document.querySelectorAll('.elementor-gallery-title'); if (!tabs.length) return false; const target = document.querySelector( `.elementor-gallery-title[data-gallery-index="${tabIndex}"]` ); if (target) { target.click(); return true; } return false; } // Keep trying because Elementor loads dynamically let tries = 0; const maxTries = 30; const interval = setInterval(() => { if (clickTab() || tries > maxTries) { clearInterval(interval); } tries++; }, 500); });
error: Content is protected !!