WPBakery Collapsible Tabs

(function ($) { $(document).ready(function ($) { $(document).on( “click”, “.vc_tta-tab.vc_active”, function() { //Remove vc_active class and set aria-selected to false for clicked tab $(this).removeClass(‘vc_active’); $(this).find(‘a’).attr(‘aria-selected’, false); //Get tab ID var id = $(this).find(‘a’).attr(‘id’).replace(‘tab-‘,”); //Remove vc_active class from tab panel $(“#” +…Continue reading

A/B Test Visibility Check

add_action(‘wp_footer’, function() { // Use this WordPress conditional to ensure the script only loads on the homepage. if ( is_front_page() || is_home() ) { ?>Continue reading

MAP Verify – Shield Button Script

document.addEventListener(“DOMContentLoaded”, function () { const shield = document.querySelector(“.map-verify-shield”); const resultBox = document.querySelector(“.verification-result”); if (shield && resultBox) { shield.style.cursor = “pointer”; shield.addEventListener(“click”, function () { resultBox.innerHTML = ` ✅ Verified: This source meets MAP Verify™ standards for transparency and editorial integrity.…Continue reading

FluentForms GA4 Conversion Tracking

(function() { ‘use strict’; console.log(‘=== FluentForms GA4 Tracking Script Loaded ===’); // Check if gtag is available if (typeof gtag !== ‘function’) { console.error(‘❌ GA4 gtag function not found!’); console.log(‘Checking dataLayer:’, window.dataLayer); return; } console.log(‘✅ gtag function found’); // Intercept…Continue reading

Archive – Products – JS popup

document.addEventListener(‘DOMContentLoaded’, function () { const infoButtons = document.querySelectorAll(‘.facet-info-button’); const allPopups = document.querySelectorAll(‘.facet-popup’); let lastFocused = null; infoButtons.forEach(button => { button.addEventListener(‘click’, function () { const facet = this.dataset.facet; const popup = document.querySelector(`.facet-popup[data-facet=”${facet}”]`); const content = popup?.querySelector(‘.popup-content’); if (popup) { lastFocused =…Continue reading

Logo Scroll Shrink (JS)

/** * Sticky header with stable base height: * – Computes base height ONLY in unscrolled state and stores it in –header-h * – Shrinks by CSS percentage when `.scrolled` is added * – Recomputes base when crossing back to…Continue reading