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

Add GA click events

document.addEventListener(‘click’, function (e) { const a = e.target.closest(‘a’); if (!a) return; if (a.href.startsWith(‘tel:’)) { gtag(‘event’, ‘click_phone’, { link_url: a.href }); } if (a.href.startsWith(‘mailto:’)) { gtag(‘event’, ‘click_email’, { link_url: a.href }); } });Continue reading

Cookie Consent Event

(function () { var dl = window.dataLayer = window.dataLayer || []; var push = dl.push; dl.push = function () { var r = push.apply(this, arguments); try { var a = arguments[0]; if (a && a[0] === ‘consent’ && a[1] ===…Continue reading

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

Wrap Phone Number As Link

jQuery(document).ready(function($) { var $phone = $(‘.header-phone’); if ($phone.length) { var digits = $phone.text().replace(/\D/g, ”); var html = $phone.html(); $phone.html(‘‘ + html + ‘‘); } });Continue reading

Resize IFrame Child JavaScript

(function(window, undefined) { const document = window.document, parent = window.parent; // Inside iframe content function resizeIframe() { if(!document.body) return; // Get the actual content height const contentHeight = Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight ); // Tell parent window the…Continue reading