Smash Ballon Content “load more” Link entfernen

jQuery(document).ready(function ($) { function unwrapSbiExpandLinks(context) { $(context).find(‘.sbi_expand > a’).each(function () { // entfernen, Inhalt behalten (z.B. …) $(this).replaceWith($(this).contents()); }); } // 1) initial unwrapSbiExpandLinks(document); // 2) nach Klick auf “Mehr laden” (zusätzliche Absicherung) $(document).on(‘click’, ‘#sbi_load .sbi_load_btn, .sbi_load_btn’, function () {…Continue reading

Smash Balloon Bild-Links Tabindex

jQuery(document).ready(function ($) { const observer = new MutationObserver(function () { $(‘.sbi_photo’).attr(‘tabindex’, ‘0’); }); observer.observe(document.body, { childList: true, subtree: true }); });Continue reading

HosaEna Header Solid Transition (copy)

(function(){ const header = document.querySelector(‘.site-header’); function setSolidByScroll(){ if(!header) return; if(window.scrollY > 50){ header.classList.add(‘he-solid’); } else { header.classList.remove(‘he-solid’); } } window.addEventListener(‘scroll’, setSolidByScroll, {passive:true}); document.addEventListener(‘DOMContentLoaded’, setSolidByScroll); if(header){ header.addEventListener(‘mouseenter’, ()=> header.classList.add(‘he-solid’)); header.addEventListener(‘mouseleave’, ()=> setSolidByScroll()); } })();Continue reading

HosaEna Header Solid Transition (copy)

(function(){ const header = document.querySelector(‘.site-header’); function setSolidByScroll(){ if(!header) return; if(window.scrollY > 50){ header.classList.add(‘he-solid’); } else { header.classList.remove(‘he-solid’); } } window.addEventListener(‘scroll’, setSolidByScroll, {passive:true}); document.addEventListener(‘DOMContentLoaded’, setSolidByScroll); if(header){ header.addEventListener(‘mouseenter’, ()=> header.classList.add(‘he-solid’)); header.addEventListener(‘mouseleave’, ()=> setSolidByScroll()); } })();Continue reading

Body on Scroll (copy)

;(function ($) { $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll >= 5) { $(“body”).addClass(“scroll-500”); $(“.tm-header”).removeClass(“uk-blend-difference”); } else { $(“body”).removeClass(“scroll-500”); $(“.tm-header”).addClass(“uk-blend-difference”); } }); })(jQuery);Continue reading

SniffLightbox

document.addEventListener(‘envira_lightbox_open’, function(e) { console.log(“Lightbox si è aperto!”); console.log(“Dettagli dell’immagine:”, e.detail); // O e.data // e.detail conterrà informazioni come: // { src: “URL-immagine.jpg”, title: “Titolo”, caption: “Didascalia”, … } // Per trovare l’ID specifico dell’immagine (se disponibile o ricavabile dal contesto)…Continue reading

使用.number 加入數字跳動動態

document.addEventListener(“DOMContentLoaded”, function () { const counters = document.querySelectorAll(“.number”); const animateCounter = (counter) => { // 避免重複執行 if (counter.dataset.animated) return; counter.dataset.animated = “true”; // 取出 + const sup = counter.querySelector(“sup”); const supHTML = sup ? sup.outerHTML : “”; // 取純數字(忽略 sup)…Continue reading

Referral Visit

const refCode = localStorage.getItem(“pending_referral”); fetch(“http://127.0.0.1:8000/auth/signup”, { method: “POST”, headers: { “Content-Type”: “application/json” }, body: JSON.stringify({ name, email, password, referral_code: refCode }) });Continue reading

Order Complete

const refCode = localStorage.getItem(“pending_referral”); fetch(“http://127.0.0.1:8000/auth/signup”, { method: “POST”, headers: { “Content-Type”: “application/json” }, body: JSON.stringify({ name, email, password, referral_code: refCode }) }); localStorage.removeItem(“pending_referral”);Continue reading