Motion on/off button-Javascript

// Accessibility Motion Toggle Script // Disables videos, Lottie, parallax, and module-based animations for motion-sensitive users // Add early class to prevent animations from starting before DOMContentLoaded if ( localStorage.getItem(“animationsDisabled”) === “true” || (window.matchMedia(“(prefers-reduced-motion: reduce)”).matches && localStorage.getItem(“animationsDisabled”) === null) )…Continue reading

JavaScript: Prevent Apostrophe in Email

document.addEventListener(“DOMContentLoaded”, function () { let emailFields = [ document.getElementById(“signup_email”), // Registration form document.getElementById(“billing_email”) // Checkout page ]; emailFields.forEach(function (emailField) { if (emailField) { emailField.addEventListener(“input”, function () { if (emailField.value.includes(“‘”)) { alert(“Error: Email addresses cannot contain apostrophes.”); emailField.value = emailField.value.replace(/’/g, “”);…Continue reading

Play/Pause Button for hero videos {javascript}

function toggleVideo() { const video = document.querySelector(‘video’); const playPauseBtn = document.getElementById(‘playPauseBtn’); if (!video || !playPauseBtn) { console.warn(‘Video or button not found’); return; } if (video.paused) { video.play(); playPauseBtn.classList.remove(‘play’); playPauseBtn.setAttribute(‘aria-label’, ‘Pause video’); } else { video.pause(); playPauseBtn.classList.add(‘play’); playPauseBtn.setAttribute(‘aria-label’, ‘Play video’); }…Continue reading

Docsbot with custom data

DocsBotAI.init( { id: ”, supportCallback: function ( event, history ) { event.preventDefault(); hideDocsBot(); }, identify: { name: yourtheme.user.name, email: yourtheme.user.email, userid: yourtheme.user.id } } );Continue reading

Dynamic Card Link Updater – Tools und Plugins calculation form

jQuery(document).ready(function ($) { // Get URL parameters from the current page URL var urlParams = new URLSearchParams(window.location.search); // Populate the card titles with corresponding links from the URL $(‘.link_to_homepage .card_title’).html(`Link to homepage`); $(‘.login_link .card_title’).html(`Login Link`); $(‘.link_to_the_features_page .card_title’).html(`Link to the Features…Continue reading

Videoteca – Capitoli

// configurazione.js – File di configurazione CAPITOLI // Dati dei capitoli correlati const capitoliData = [ { titolo: ‘Endometriosi e dolore pelvico’, thumbnail: ‘https://placehold.co/300×180’, url: ‘/endometriosi-dolore-pelvico.html’, relatore1: { nome: ‘Dott. Marco Rossi’, profiloUrl: ‘/profilo-rossi.html’ }, relatore2: { nome: ‘Dott.ssa Anna…Continue reading

Videoteca – Angeli

// configurazione.js – File di configurazione ANGELI // Indice del capitolo selezionato (0-based) const selectedCapitoloIndex = 1; // Seleziona il capitolo (indice -1 del numero di capitolo) // Array unificato con tutti i dati video e relatore const videoData =…Continue reading

Dynamic Phone Button and Image Box Links

jQuery(document).ready(function ($) { // Get URL parameters var urlParams = new URLSearchParams(window.location.search); // Populate the phone button with the phone number var phoneNumber = urlParams.get(‘phone’); if (phoneNumber) { $(‘.phone-button’).attr(‘href’, ‘tel:’ + phoneNumber); $(‘.phone-button’).text(‘Kunde anrufen (‘ + phoneNumber + ‘)’); }…Continue reading