Get new jQuery plugins just once a week

×

isInViewport-js

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

Download

Example

isInViewport-js jQuery plugin

element inside

isInViewport-js

Related posts:

FilmRoll
webui popover
jquery-overlap
isInViewport-js jQuery plugin

http://jquer.in/wp-content/uploads/2014/06/isInViewport-js.jpg

jQuery plugin

Sign up for our weekly newsletter.

* We won't spam you ever