Within Viewport indicates whether an element is entirely within the viewport. It also allows you to specify your site’s effective viewport (eg, to account for fixed header and navigation bars) and provides a few handy shortcut notations.
It’s quite simply to use:
var elem = document.getElementById("myElem");
// Returns true if it's completely visible
// Same as above, but using the jQuery plugin
// Run some function on all visible divs
Live Demo • Source Code at Github
But what if a very popular site, one that nearly everyone would hit before reaching your site, loaded those libraries? I imagine the number of users running cached libraries would increase dramatically.