ElevenLabs audio
Loading the Elevenlabs Text to Speech AudioNative Player…Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
Loading the Elevenlabs Text to Speech AudioNative Player…Continue reading
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
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
/** * Gravity Forms – combine State / Province into one hidden field. * * Required CSS classes: * State field: gf-state * Province field: gf-province * Hidden field: gf-state-province */ (function () { function syncStateProvince() { var state =…Continue reading
(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
jQuery(document).ready(function($) { var $titleSource = $(‘.banner-overlay-title’).first(); if ($titleSource.length && $(‘.innerbanner’).length) { $(‘.innerbanner’).html(‘ ‘ + $titleSource.html() + ‘ ‘); $titleSource.hide(); } });Continue reading
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
(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
(function(window, undefined) { const document = window.document; // Parent page JavaScript window.addEventListener(‘message’, function(event) { // Security check (optional but recommended) if (event.origin !== ‘https://environment.asj-net.com’) return; if (event.data.type === ‘resize’) { const iframe = document.querySelector(‘.auto-resize-iframe’) iframe.style.height = event.data.height + ‘px’; }…Continue reading
(function () { var id = location.hash.slice(1); if (!id) { return; } function scrollToAnchor() { var el = document.getElementById(id); if (el) { el.scrollIntoView({ block: ‘start’ }); } } scrollToAnchor(); // initial attempt window.addEventListener(‘load’, scrollToAnchor); // after images/etc. if (document.fonts &&…Continue reading