Light and Dark Timer

document.addEventListener(“DOMContentLoaded”, function() { // 1. Hide ALL the holiday switches first document.querySelectorAll(‘.pj-icon-toggle’).forEach(el => el.style.display = ‘none’); // 2. Figure out today’s Month and Day const today = new Date(); const month = today.getMonth() + 1; // January is 1, October…Continue reading

gtag im header – neu/vanilla

(function () { ‘use strict’; function push(obj) { window.dataLayer = window.dataLayer || []; window.dataLayer.push(obj); } function stripUrl(href) { return (href || ”).replace(/^(https?:\/\/)?(www\.)?/, ”); } function currentTabAnchor(el) { var tabs = el.closest(‘.su-tabs’); var cur = tabs && tabs.querySelector(‘.su-tabs-current’); return cur &&…Continue reading

Script Header

document.addEventListener(‘DOMContentLoaded’, function() { const firstHeader = document.querySelector(‘.first-header’); const secondHeader = document.querySelector(‘.second-header’); if (!firstHeader || !secondHeader) return; // Check if mobile const isMobile = window.innerWidth SCROLL_THRESHOLD && !isSecondHeaderVisible) { isSecondHeaderVisible = true; // First header slides up and fades firstHeader.style.transition =…Continue reading

Open external links in new tab

document.addEventListener(“DOMContentLoaded”, function() { var links = document.querySelectorAll(“a[href]”); links.forEach(function(link) { if (link.hostname !== window.location.hostname) { link.setAttribute(“target”, “_blank”); link.setAttribute(“rel”, “noopener noreferrer”); } }); });Continue reading

Jostar Kitchen Reno Budget Calculator

(function(){ /* ===== Gravity Forms settings: replace the numbers with your form and field IDs ===== */ var JKR_GF={ formId: 0, /* e.g. 7 */ fields:{ /* Hidden field IDs from the form editor */ home:0, scope:0, budget:0, contingency:0, total:0,…Continue reading

Jostar Kitchen Reno Budget Calculator

(function(){ /* ===== Gravity Forms settings: replace the numbers with your form and field IDs ===== */ var JKR_GF={ formId: 0, /* e.g. 7 */ fields:{ /* Hidden field IDs from the form editor */ home:0, scope:0, budget:0, contingency:0, total:0,…Continue reading

GSAP Data Scroll Speed X+Y and Opacity (JS)

gsap.registerPlugin(ScrollTrigger); (() => { const maxScroll = () => ScrollTrigger.maxScroll(window); const H_DIR = 1; // flip all horizontal directions by setting to -1 // Any element with these attributes will be animated const targets = gsap.utils.toArray( “[data-speed], [data-speed-x], [data-speed-y], [data-opacity],…Continue reading