Hello viewers... In this video we will see how to reveal elements on scroll using pure vanilla JavaScript without any plugins. This was one of the easiest way to reveal elements on scrolling which was a headache for a lot of JavaScript beginners.
The two important functions in the video I used was 'window.innerHeight' and 'getBoundingClientRect().top'. Let's discuss each below.
Window is an object and it has many properties in it. And window.innerHeight it gives us the inner height of the window object.
getBoundingClientRect() is also an object and it has many properties as the window object and one of the properties is top which gives the top property of the item mentioned while writing it.
* Source Code*
https://codepen.io/pen/?template=qBaVxQG
If you liked the video, smash the like button and make sure you are subscribed to the channel and press the bell icon to the instant notification of our latest video :)