How to determine what percentage of a DOM element is inside the current viewport ? I want to calculate the ratio of area of element inside viewport and the total area of the element.
Related question: How to tell if a DOM element is visible in the current viewport?