I'm working on a website on which scroll is disabled when the user scrolls to a certain point and then after some seconds the scroll should be re enabled. How Can this be done ?
Here's the code:
<script>
document.addEventListener('scroll', function (scrollbar_disable) {
if (window.scrollY > 650) {
document.body.style.overflowY = "hidden";
}
});
</script>
Aucun commentaire:
Enregistrer un commentaire