Type: js
Save Stuff?
var element = document.getElementById(‘send1LumpTo0’); var element2 = document.getElementById(‘send2LumpTo0’); var element3 = document.getElementById(‘send3LumpTo0’); var two = document.getElementById(‘two’); var three = document.getElementById(‘three’); var four = document.getElementById(‘four’); var five = document.getElementById(‘five’); var six = document.getElementById(‘six’); var seven = document.getElementById(‘seven’); var eight = document.getElementById(‘eight’);…Continue reading
JS WCAG: Kadence dark mode toggle
// get elements by class name const darkModeToggles = document.getElementsByClassName( ‘kadence-color-palette-non-fixed-switcher’ ); // check if dark mode toggles exist if ( darkModeToggles.length > 0 ) { const checkAria = (darkModeToggle) => { // check if body has class .color-switch-dark if…Continue reading
Warranty Product Google Sheet Scripts
const clientId = “913975986247-4v5j5nhs493nnnolshuq6lt5lr1n3mkq.apps.googleusercontent.com”; const clientSecrect = “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”; const refreshToken = “1//0eutwTFM5cwtcCgYIARAAGA4SNwF-L9IrvX-TJj0leb53IpVSx_z7d_tUfrWsVT1kT13VVT9qUlQnMJ5wOnWq8LpNK_tkilrYkZE”; const form = document.getElementById(“warranty-search-form”); const resultsContainer = document.getElementById(“warranty-result”); if(form) { form.addEventListener(“submit”, async (e) => { e.preventDefault(); if(grecaptcha.getResponse() !== “”){ resultsContainer.innerHTML = ‘ ‘; const searchInput = document.getElementById(“warranty-serial-input”); //…Continue reading
Hubspot Web Snippet
JS – Plug ALD villatheme – Nascondi Spedizioni troppo costose con jquery (CLOUD attivo) (vecchio)
/* quest script serve sul plugin ALD di villatheme, che mette nella pagina e nel carrello checkout le spedizioni aliexpress. visto che le spedizioni alcune hanno costi assurdi, ho impostato che non vengano visualizzate le spedizion iche superano una numero.…Continue reading
Nav scroll colour change
jQuery(document).ready(function(){ jQuery(window).scroll(function() { var scroll = jQuery(window).scrollTop(); if (scroll >= 100) { jQuery(“.pa-header”).addClass(“pa-fixed-header”); } else{ jQuery(“.pa-header”).removeClass(“pa-fixed-header”); } }); });Continue reading
MFP > Scroll Blur
“use strict” // Determine if an element is in the visible viewport function isInViewport(rect) { var html = document.documentElement; return ( rect.top >= 0 && rect.left >= 0 && rect.bottom 40 ) op = op * .75; if (op >…Continue reading