How to determine if "html" or "body" scrolls the window.
- by David Murdoch
The code below is used to find the element that can be scrolled (body or html) via javascript.
var scrollElement = (function (tags) {
var el, $el, init;
// iterate through the tags...
while (el = tags.pop()) {
$el = $(el);
// if the scrollTop value is already > 0 then this element will work
…