Type: js
JS-snippet: knoppen toevoegen lesrooster en AJAX triggeren
jQuery(document).ready(function($){ var table = $(‘#tablepress-36’); if (!table.length) return; table.find(‘tbody tr’).each(function(index){ var row = $(this); var row_index = index + 1; // eerste rij header = 0 var button = $(‘‘, { text: ‘Geef je op’, class: ‘lesrooster-registreer-btn’, style: ‘margin-left:10px;padding:5px 10px;background:#0073aa;color:#fff;border:none;border-radius:3px;cursor:pointer;’…Continue reading
Canvas Capture JS
jQuery(function($) { console.log(‘🎨 Canvas capture active (optimized)’); var processing = false; var colorIndex = null; // Block other colors when opening preview $(document).on(‘mousedown touchstart’, ‘[data-live-preview-button-text]’, function(e) { if (processing) return false; processing = true; e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); var $btn =…Continue reading
SVG Tooltip
const tooltip = document.getElementById(“map-tooltip”); document.querySelectorAll(“.county”).forEach(path => { path.addEventListener(“mousemove”, e => { tooltip.textContent = path.dataset.tooltip; tooltip.style.left = e.pageX + “px”; tooltip.style.top = e.pageY + “px”; tooltip.style.opacity = 1; }); path.addEventListener(“mouseleave”, () => { tooltip.style.opacity = 0; }); });Continue reading
No Follow Social Links
document.addEventListener(‘DOMContentLoaded’, function() { // Selectors for ALL Social Links: // 1. .is-style-default a (For the global footer buttons) // 2. .social-stack-full a (For the specific buttons on Link Page) var socialLinks = document.querySelectorAll(‘.is-style-default a, .social-stack-full a’); socialLinks.forEach(function(link) { // Ensure…Continue reading
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