Raver Dogs Burger Engine

// This script waits for the page to be ready before it runs document.addEventListener(‘DOMContentLoaded’, function() { // Find the hamburger button on the page const toggleButton = document.querySelector(‘.menu-toggle’); // Only run the rest of the code if the button actually…Continue reading

Raver Dogs General Site Snips (copy)

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

Raver Dogs General Site Snips (copy)

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

floating-monsterlink-2.js

// Floating MonsterLink Style 2 jQuery(document).ready(function ($) { //* Animate Floating MonsterLink into view on page load $(‘.floating-monsterlink.style2’).addClass(‘show’); //* Animate out of view function function closeFloatingMonsterLink(e) { e.preventDefault(); $(‘.floating-monsterlink.style2’).removeClass(‘show’); } //* Triggers that run closeFloatingMonsterLink function // run closeFloatingMonsterLink when…Continue reading

floating-monsterlink-1.js

// Floating MonsterLink Style 1 jQuery(document).ready(function ($) { //* Animate Floating MonsterLink into view on page load $(‘.floating-monsterlink.style1’).addClass(‘show’); //* Animate out of view function function closeFloatingMonsterLink(e) { e.preventDefault(); $(‘.floating-monsterlink.style1’).removeClass(‘show’); } //* Triggers that run closeFloatingMonsterLink function // run closeFloatingMonsterLink when…Continue reading

om external links monsterlink

(function(window, document) { // Your campaign’s UNIQUE ID var campaignSlug = ‘YOUR-UNIQUE-ID’; // Helper to get an anchor element. var getLink = function(element) { var parent = element; while (parent && ‘A’ !== parent.tagName) { parent = parent.parentNode; } return…Continue reading

disable webfonts

document.addEventListener(‘om.Campaign.init.preload’, function(event) { var campaign = event.detail.Campaign; campaign.settings.preload = false; });Continue reading

Add aria-describedby using add-describedby class

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