Contact Modal Jump Prevent (JS)
document.addEventListener(‘click’, function(e){ const trigger = e.target.closest(‘.open-contact-modal > a’); if (trigger) e.preventDefault(); // prevents jump-to-top on # });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
document.addEventListener(‘click’, function(e){ const trigger = e.target.closest(‘.open-contact-modal > a’); if (trigger) e.preventDefault(); // prevents jump-to-top on # });Continue reading
(function () { // ———- config ———- const WRAP_SEL = “.p25-artist-list-wrapper”; const ITEM_SEL = “.p25-artist-item”; const GSAP = window.gsap; const REVEAL = { y: 10, dur: 0.35, stagger: 0.045, ease: “power2.out” }; // ———- helpers ———- const debounce = (fn,…Continue reading
document.addEventListener(“DOMContentLoaded”, function () { if (typeof gsap === “undefined”) { console.error(“GSAP is not loaded.”); return; } gsap.registerPlugin(ScrollTrigger); // ========================================================================== // Initial State — Hide Elements Before Page Load // ========================================================================== // Repeater Rows gsap.set(“.cont-repeater-row”, { autoAlpha: 0 }); // Hero…Continue reading
gsap.registerPlugin(SplitText); document.querySelectorAll(‘.fc25_hover_text_underline_container’).forEach(function (container) { container.addEventListener(‘mouseenter’, function () { const textElement = container.querySelector(‘.fc25_hover_text_underline_text’); if (!textElement) return; // Clear existing underlines container.querySelectorAll(‘.underline’).forEach(function (line) { line.remove(); }); // Split the text into characters using SplitText const splitText = new SplitText(textElement, { type: ‘chars’,…Continue reading
document.addEventListener(“DOMContentLoaded”, function () { var mapInitialized = false; function initMap() { if (mapInitialized) return; mapInitialized = true; var mapDiv = document.getElementById(“pg-map”); if (!mapDiv) return; var peid = parseInt(mapDiv.getAttribute(“data-peid”), 10); if (!peid) return; var map = new maplibregl.Map({ container: “pg-map”, style:…Continue reading
function preventNumberScroll(e) { if (e.target.matches(‘input[type=”number”]’) || e.target.closest(‘input[type=”number”]’)) { e.preventDefault(); } } document.addEventListener(‘wheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘mousewheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘DOMMouseScroll’, preventNumberScroll, { passive: false, capture: true });Continue reading
import { BrowserRouter, Routes, Route, Link } from “react-router-dom”; import “./styles.css”; function Header() { return ( SH Signature Hôtelière Accueil Particuliers Professionnels ); } function Home() { return ( Literie hôtelière haut de gamme Signature Hôtelière vous accompagne dans vos…Continue reading
jQuery(document).on(‘shown.bs.modal’, function() { if (typeof frmFrontForm !== ‘undefined’) { // Wait 200ms for modal animation to finish setTimeout(function() { frmFrontForm.init(); // This loop finds every Formidable form in the modal automatically jQuery(‘.frm_forms’).each(function() { var formId = jQuery(this).find(‘input[name=”form_id”]’).val(); if (formId) {…Continue reading
(function(){ var BLOCKED = new Set([ ‘gmail.com’,’googlemail.com’,’yahoo.com’,’ymail.com’,’rocketmail.com’, ‘hotmail.com’,’outlook.com’,’live.com’,’msn.com’, ‘icloud.com’,’me.com’,’mac.com’, ‘aol.com’,’aim.com’, ‘proton.me’,’protonmail.com’, ‘yandex.com’,’mail.com’,’zoho.com’,’gmx.com’,’fastmail.com’,’yumobiz.com’ ]); function domainOf(v){ var at = (v||”).lastIndexOf(‘@’); return at>-1 ? v.slice(at+1).toLowerCase().trim() : ”; } function invalid(input){ return BLOCKED.has(domainOf(input.value||”)); } function setErr(input){ var field = input.closest(‘.gfield’); if (!field) return;…Continue reading