snow monkey forms サンクスページのbodyにclass付与

document.addEventListener(‘DOMContentLoaded’, () => { const observer = new MutationObserver(() => { const form = document.querySelector(‘[data-screen]’); if (form) { const screen = form.getAttribute(‘data-screen’); if (screen === ‘confirm’) { document.body.classList.add(‘smf-confirm’); observer.disconnect(); } else if (screen === ‘complete’) { document.body.classList.add(‘smf-complete’); observer.disconnect(); } }…Continue reading

Basic | Mobile Menu Visibility anpassen (Screenreader & tabfocus)

jQuery(function ($) { const body = $(‘body’); const page = $(‘#page’); const navWrapper = $(‘.dt-mobile-header’); const mobileMenu = $(‘#mobile-menu’); const miniWidgets = $(‘.mobile-mini-widgets-in-menu’); let lastFocusedElement = null; // Fokusfalle aktivieren function trapFocus(container) { const focusableEls = container.find(‘a, button, input, [tabindex]:not([tabindex=”-1″])’).filter(‘:visible’);…Continue reading

Remove Specific Campaign Based on the Referral URL

document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading

Remove Specific Campaign From Any URLs Containing a Specific URL Path

document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.search.indexOf(‘shopping-cart’) > -1) { // replace shopping-cart wtih your specific URL path var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID’); // replace CAMPAIGN_ID with the unique ID of your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading