Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

viewport


intoViewport Scroller

Plugin to scoll to a certain DOM-element, but only if this element is not already in the browser's view port. Also scrolls only as far as necessary. Uses animate(), so scroll effects are customizable as every other animation (callback, speed...)

How to use

Easy. Make sure the plugin is loaded, then use e.g.:
$('a').eq(4).intoViewport();
This will scroll the 4th link on the page into the browser's field of vision.

Options

intoViewport will pass its parameter to animate(), so you can use all it's options:
$('a').eq(4).intoViewport({duration:"slow",easing:"linear"});

Download

The download below is a comment documented version, for producton you can use the minified verion (480 Bytes).