Insert Title Into Page Banner

jQuery(document).ready(function($) { var $titleSource = $(‘.banner-overlay-title’).first(); if ($titleSource.length && $(‘.innerbanner’).length) { $(‘.innerbanner’).html(‘ ‘ + $titleSource.html() + ‘ ‘); $titleSource.hide(); } });Continue reading

Notifications – Site Wrapper

/** * Site Wrapper JS * * Creates the .notification-page-wrap element used by the * notification panel animation. * * The wrapper contains the Elementor header, main content, and footer. * When body.notifications-open is added, CSS shrinks this wrapper *…Continue reading

Hero – Slider Controller

/** * Hero Slider JS * * Controls the full-screen hero card slider. * * Requires: * – .era-hero-slider * – .era-hero-slide * – .era-hero-dot * * Features: * – Sets active slide state * – Tracks previous slides *…Continue reading

VC Reveal — WPCode JS Snippet ── Version: 1.1.0

/** * VC Reveal — WPCode JS Snippet * Version: 1.1.0 * * Staggered scroll-reveal animation for page content. * Works alongside vc-scene–wpcode.js but is fully independent. * * Requires: vc-reveal–global.css in Oxygen Global CSS * Dependencies: GSAP + ScrollToPlugin…Continue reading

Mark current link including parent

// Target only main navigation const mainNav = document.querySelector(‘#menu-main-menu’); if (mainNav) { const currentPath = window.location.pathname; mainNav.querySelectorAll(‘a’).forEach(link => { const linkPath = new URL(link.href).pathname; // Exact match – current page if (linkPath === currentPath) { link.classList.add(‘active’); link.parentElement.classList.add(‘current-menu-item’); // Add to…Continue reading

GA4 Custom Event Tracking

/** * GA4 Custom Event Tracking * Tracks lead method, service type, page type, neighborhood, ZIP code, link text, and link URL. */ (function() { function getServiceType() { const path = window.location.pathname.toLowerCase(); if (path.includes(‘tv-mounting’)) return ‘tv-mounting’; if (path.includes(‘mirror-mounting’)) return ‘mirror-mounting’;…Continue reading

Smooth Scroll

document.querySelectorAll(‘a[href^=”/#”]’).forEach(link => { link.addEventListener(‘click’, function(e) { e.preventDefault(); const target = document.querySelector(this.getAttribute(‘href’).replace(‘/’, ”)); if (target) { window.scrollTo({ top: target.offsetTop – 80, behavior: ‘smooth’ }); } }); }); “Continue reading

Home JS

// Mythos homepage interactions — WPCode → JS Snippet → Site Wide Footer (function(){ function ready(fn){ if(document.readyState!==’loading’)fn(); else document.addEventListener(‘DOMContentLoaded’,fn); } ready(function(){ var root=document.querySelector(‘.mt-page’); if(!root)return; // Scroll-aware nav var nav=document.getElementById(‘mtNav’); window.addEventListener(‘scroll’,function(){ nav.classList.toggle(‘scrolled’,window.scrollY>30); },{passive:true}); // Mobile menu var burger=document.getElementById(‘mtBurger’), mob=document.getElementById(‘mtMobile’); if(burger){ burger.addEventListener(‘click’,function(){…Continue reading

Colour Code Structure Panel JS

(() => { “use strict”; /* —————————– Config (Dark Mode Optimized) —————————– */ const PSEUDO_TAG_SELECTOR = “.etch-builder-accordion__header-button > span:not([class])”; const LABEL_SELECTOR = “.etch-builder-accordion__header-label”; // Pastell-Töne für bessere Lesbarkeit auf dunklem Grund const COMPONENT_COLOUR = “#c084fc”; // Soft Purple const LOOP_COLOUR…Continue reading