Get new jQuery plugins just once a week



June 29, 2014

isInViewport-js | jQuery plugin to test whether element is in viewport

isInViewport-js is an ultra-light jQuery plugin that tells you if an element is in the viewport but with a twist.

Example Code :

$( 'selector:in-viewport( tolerance[, viewport selector] )' )

This returns all the elements that are in the viewport while taking into account the tolerance criterion.
Since it returns the element(s) it can thus be chained with other jQuery methods.
When a viewport selector is specified, it uses that to calculate if the element is in that viewport or not.
When a viewport selector is not specified, it defaults to window as the viewport.
The viewport selector is any valid jQuery selector.

Created by Mudit Ameta



isInViewport-js jQuery plugin

element inside


Related posts:

isInViewport-js jQuery plugin

jQuery plugin

Sign up for our weekly newsletter.

* We won't spam you ever
Couple Gift Ideas