1// Scroll to top functionality 2document.addEventListener('DOMContentLoaded', function() { 3 const scrollToTopButton = document.getElementById('scrollToTop'); 4 5 // Mostrar/ocultar el botón basado en el scroll 6 window.addEventListener('scroll', function() { 7 if (window.scrollY > 300) { 8 scrollToTopButton.classList.add('visible'); 9 } else { 10 scrollToTopButton.classList.remove('visible'); 11 } 12 }); 13 14 // Manejar el click del botón 15 scrollToTopButton.addEventListener('click', function() { 16 window.scrollTo({ 17 top: 0, 18 behavior: 'smooth' 19 }); 20 }); 21}); 22 23// Mostrar el botón solo si la pantalla es menor de 768px (opcional) 24document.addEventListener("DOMContentLoaded", function () { 25 const btn = document.getElementById("whatsappButton"); 26 if (window.innerWidth > 768) { 27 // btn.style.display = "none"; // Descomenta si quieres ocultarlo en desktop 28 } 29});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.