mikecrittenden/toogles — pull request #9 by ispedals (2013-02-26 22:48:34+00:00)
Title: Fix whenScrolled directive for non-webkit browsers

Webkit and non-Webkit engines disagree about whether the body or the documentElement scrolls. Webkit thinks the body scrolls, defining body.scrollTop and setting documentElement.scrollTop to 0. Non-Webkit browsers in standards mode think the opposite and define documentElement.scrollTop while setting body.scrollTop to 0. Sidestep this issue by using window.pageYOffset. pageYOffset is undefined in IE < 9, but those versions are not supported anyway.