Skip to content
Advertisement

Hiding div when the user scrolls the div not working in JavaScript

I have a section in my website which is built using HTML and CSS, the section is contains a scrollbar with it for users to scroll down, the complete code is below:

JavaScript
JavaScript
JavaScript

As you can see I have given a div saying “scroll down” so users will understand there is content below. I want the div to be hidden when the user scrolls the bar, as you can see I have given JavaScript to it, but it’s not working. Can anyone please tell me what could be wrong here.

Advertisement

Answer

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement