Check Whether A DOM Element Is Visible Example

A super tiny jQuery script that calculates the position of an element from the top of the page and then executes custom functions when the element becomes visible/invisible on scroll.

Please scroll down to see the magic !

Section 1

Section 2

I will be detect when you scroll here

Section 3

Section 4