I have an HTML document with images in a grid format using . The browser window has both vertical & horizontal scrolling.
. The browser window has both vertical & horizontal scrolling.
Here's a quick jQuery plugin to map the built in browser functionality nicely:
$.fn.ensureVisible = function () { $(this).each(function () { $(this)[0].scrollIntoView(); }); }; ... $('.my-elements').ensureVisible();