Generation

generate functionFri, 17 Feb 2023

an active div alaways on top of screen

var topDiv = document.getElementById('top'); window.onscroll = function(e) { window.scrollY > 0 ? topDiv.classList.add('top-active') : topDiv.classList.remove('top-active'); }

TypeScript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code