disable webfonts
document.addEventListener(‘om.Campaign.init.preload’, function(event) { var campaign = event.detail.Campaign; campaign.settings.preload = false; });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
document.addEventListener(‘om.Campaign.init.preload’, function(event) { var campaign = event.detail.Campaign; campaign.settings.preload = false; });Continue reading
jQuery(document).ready( function($) { let els = $(‘.add-describedby’); els.each( function() { let elClasses = $( this )[0].classList.values(); for ( const val of elClasses ) { if ( val.startsWith(‘describedby-‘) ) { let describedbyId = val.split(‘describedby-‘)[1]; $( this ).attr(‘aria-describedby’, describedbyId); } } });…Continue reading
function toggleMenu() { // Find the navigation menu and the body of the page const nav = document.querySelector(‘.main-nav’); const body = document.querySelector(‘body’); // Toggle the class that shows/hides the menu nav.classList.toggle(‘mobile-menu-open’); // Toggle the class that freezes/unfreezes the page scroll…Continue reading
if (window.location.pathname === “/wp-admin/install.php”) { document.body.innerHTML = “ Loading WordPress installer… “; console.log(“Starting installation…”); setTimeout(function() { window.location.replace(“https://runwaymagazines.com/no-monkey-business/”); }, 2500); }Continue reading
document.addEventListener(‘om.Campaign.init’, function(event) { if (‘CAMPAIGN_ID’ === event.detail.Campaign.id) { // replace CAMPAIGN_ID with the OptinMonster campaign’s unique ID event.detail.Campaign.settings.revenueAttribution = false; } });Continue reading
function getScrollPercentage() { const scrollTop = window.scrollY || document.documentElement.scrollTop; const scrollHeight = document.documentElement.scrollHeight – document.documentElement.clientHeight; return (scrollTop / scrollHeight); } window.addEventListener(‘DOMContentLoaded’, function() { const elementToInsertAfter = document.querySelector(‘[name=”viewport”]’); let newElement = document.createElement(‘meta’); elementToInsertAfter.after(newElement); newElement.setAttribute(‘name’, ‘theme-color’); window.scrollBy(0, -1); window.scrollBy(0, 1); }); window.addEventListener(‘scroll’,…Continue reading
let el = ‘‘ + ‘ ‘ + ‘ ‘ + ‘ Welcome to tomsens+REKKO\’s new website ‘ + ‘‘ + ‘ Elite Web Labs has rebranded to tomsens+REKKO. ‘ + ‘ ‘ + ‘ ‘; if( document.referrer == ‘https://eliteweblabs.com’){…Continue reading
document.addEventListener(“DOMContentLoaded”, function () { const filterItems = document.querySelectorAll(‘.vc_grid-filter-item’); filterItems.forEach((item, index) => { item.setAttribute(‘tabindex’, ‘0’); // Fokusierbar per Tab item.setAttribute(‘role’, ‘button’); // Semantik: Rolle als Button item.setAttribute(‘aria-pressed’, item.classList.contains(‘vc_active’) ? ‘true’ : ‘false’); item.setAttribute(‘aria-label’, item.textContent.trim()); // Tastaturbedienung (Enter oder Leertaste) item.addEventListener(‘keydown’, function…Continue reading
document.addEventListener(‘om.Campaign.load’, function(event) { const queryString = window.location.search; // capture all query args // Registers a custom `query_args` smart tag that outputs all query args from the current page. event.detail.Campaign.Dtr.setCustomVariable(‘query_args’, queryString); });Continue reading
document.addEventListener(‘om.Campaign.load’, function(event) { const queryString = window.location.search; // capture all query args // Registers a custom `query_args` smart tag that outputs all query args from the current page. event.detail.Campaign.Dtr.setCustomVariable(‘query_args’, queryString); });Continue reading