stackCards JS

document.addEventListener(“DOMContentLoaded”, () => { // ========================================================= // 🎛 STACK CARDS SETTINGS — adjust these values as needed // ========================================================= const STACK_CONFIG = { // Vertical translation distances (px) translateYUpcoming: 80, // distance per step below active translateYPrevious: 60, // distance…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

Gravity Forms Make Fields Read Only

jQuery(document).ready(function($) { $(‘#input_1_26’).on(‘mousedown’, function(e) { e.preventDefault(); this.blur(); }); }); jQuery(document).ready(function($) { $(‘#input_1_36’).on(‘mousedown’, function(e) { e.preventDefault(); this.blur(); }); }); jQuery(document).ready(function($) { $(‘#input_1_37’).on(‘mousedown’, function(e) { e.preventDefault(); this.blur(); }); });Continue reading

HosaEna Header Solid Transition

(function(){ const header = document.querySelector(‘.site-header’); function setSolidByScroll(){ if(!header) return; if(window.scrollY > 50){ header.classList.add(‘he-solid’); } else { header.classList.remove(‘he-solid’); } } window.addEventListener(‘scroll’, setSolidByScroll, {passive:true}); document.addEventListener(‘DOMContentLoaded’, setSolidByScroll); if(header){ header.addEventListener(‘mouseenter’, ()=> header.classList.add(‘he-solid’)); header.addEventListener(‘mouseleave’, ()=> setSolidByScroll()); } })();Continue reading

In Control Common JS

function isReady(reference) { switch(reference) { case ‘document’: if(window.document && window.document.body) return true; break; case ‘fancybox’: if(typeof(window.Fancybox) != ‘undefined’) return true; break; } return false; } function allReady() { var dependencies = Array.from(arguments); dependencies.unshift(‘document’); return dependencies.every(isReady); } function waitFor() { if(arguments.length…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

Single product – Select default variation

jQuery(function ($) { function selectFirstInStockVariation($form) { const variations = $form.data(“product_variations”); if (!variations || !variations.length) return; // Zoek eerste variatie die koopbaar & in stock is const first = variations.find(v => v.is_in_stock && v.is_purchasable); if (!first) return; // Loop door alle…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

Closing slide-in with a click outside

(function () { document.addEventListener(‘DOMContentLoaded’, function () { // Utility: close the slide-in gracefully function closeHustleSlide(slideIn) { if (!slideIn) return; const closeBtn = slideIn.querySelector(‘.hustle-close, .hustle-close-button, .hustle-icon-close’); if (closeBtn) { closeBtn.click(); return; } slideIn.classList.remove(‘hustle-show’); const content = slideIn.querySelector(‘.hustle-slidein-content’); if (content) { content.classList.remove(‘hustle-animate-in’);…Continue reading