WooCommerce AJAX Fix for RD Theme Live Cart Update

const DEBUG = false; // Set to true to enable console logs for debugging (function checkJQueryThenRun(retries = 10) { if (typeof jQuery === ‘undefined’) { if (DEBUG) console.warn(‘⏳ Waiting for jQuery…’); if (retries > 0) { setTimeout(() => checkJQueryThenRun(retries –…Continue reading

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

webhook code example updated

{ “lead”: { “email”: “[email protected]”, “ipAddress”: “1.2.3.4”, “referrer”: “https://optinmonster.com/”, “timestamp”: 1699985224, “privacyConsent”: true, “firstName”: “Archie”, “lastName”: “Monster”, “phone”: “888-888-8888” }, “lead_options”: { “list”: “List A”, “tags”: [ “Tag A” ], “data”: { “custom_data”: “Custom Data” } }, “campaign”: { “id”:…Continue reading

webhook updated request body example (copy)

{ “lead”: { “email”: “[email protected]”, “ipAddress”: “1.2.3.4”, “referrer”: “https://optinmonster.com/”, “timestamp”: 1699985224, “firstName”: “Archie”, “lastName”: “Monster”, “phone”: “888-888-8888” }, “lead_options”: { “list”: “List A”, “tags”: [ “Tag A” ], “data”: { “custom_data”: “Custom Data” } }, “campaign”: { “id”: “fvb1cg7s3tkuhn9lqamx”, “title”:…Continue reading

webhook updated request body example

{ “lead”: { “email”: “[email protected]”, “ipAddress”: “1.2.3.4”, “referrer”: “https://optinmonster.com/”, “timestamp”: 1699985224, “firstName”: “Archie”, “lastName”: “Monster”, “phone”: “888-888-8888” }, “lead_options”: { “list”: “List A”, “tags”: [ “Tag A” ], “data”: { “custom_data”: “Custom Data” } }, “campaign”: { “id”: “fvb1cg7s3tkuhn9lqamx”, “title”:…Continue reading

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