Add ADA Attributes to Main Content
jQuery(document).ready( function($) { $(‘#main-content’) .attr(‘role’, ‘main’) .attr(‘tab-index’, ‘-1’); });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
jQuery(document).ready( function($) { $(‘#main-content’) .attr(‘role’, ‘main’) .attr(‘tab-index’, ‘-1’); });Continue reading
jQuery( document ).ready( function($) { $(‘.hide-accessible’).attr(‘aria-hidden’, ‘true’); });Continue reading
jQuery( document ).ready( function($) { $(‘.et-pb-icon’).attr(‘aria-hidden’, ‘true’); });Continue reading
// Delayed scroll to hash (e.g., #book-call) after Calendly and Zoho Forms load document.addEventListener(“DOMContentLoaded”, function () { const targetHash = window.location.hash; function scrollToHash() { if (targetHash) { const el = document.querySelector(targetHash); if (el) { el.scrollIntoView({ behavior: “smooth”, block: “start” });…Continue reading
/** * WordPress Dashboard Widget Framework * Enhanced to properly render WPCode shortcodes inside widgets */ document.addEventListener(‘DOMContentLoaded’, function() { // Available widgets data with shortcodes const availableWidgets = [ { id: 1273, shortcode: ”, keywords: [‘phone’, ‘country finder’, ‘lookup’, ‘contact’],…Continue reading
document.addEventListener(“DOMContentLoaded”, function () { const elements = document.querySelectorAll(‘.primary_address’); elements.forEach(function (el) { const address = el.textContent.trim(); if (address !== ”) { const mapsUrl = ‘https://www.google.com/maps/dir/?api=1&destination=’ + encodeURIComponent(address); el.innerHTML = ‘‘ + address + ‘‘; } }); });Continue reading
// Author: Sumaiya, Clickup Doc: https://app.clickup.com/36636088/v/dc/12y1dr-22535/12y1dr-24455 // Wait for the DOM to fully load before executing the script document.addEventListener(‘DOMContentLoaded’, function() { // Select the tooltip container element const tooltipContainer = document.querySelector(‘.tooltip-container’); // Select the tooltip text element within the tooltip…Continue reading
/* Accessibility Enhancements for Divi Header (Mobile Menu & Search) ——————————————————————- This script improves keyboard accessibility across the Divi mobile menu and search interface by: ✅ Making all faux buttons (e.g., used as buttons) respond to Enter and Space ✅…Continue reading
window.addEventListener(‘DOMContentLoaded’, () => { document.querySelectorAll(‘.hle’).forEach((table, index) => { // Check if the table needs expansion if (table.scrollHeight { table.classList.toggle(‘expanded’); btn.textContent = table.classList.contains(‘expanded’) ? ‘Show Less’ : ‘Show More’; }); // Insert the button after the current table table.insertAdjacentElement(‘afterend’, btn); });…Continue reading
const off = 10; let l = off; const marqueeElements = Array.from(document.querySelectorAll(‘.marquee span’)); const speed = 1.5; const stack = []; let pause = false; marqueeElements.forEach(element => { const width = element.offsetWidth + off; element.style.left = `${l}px`; l += width;…Continue reading