Created
April 3, 2013 23:48
-
-
Save zmax/5306517 to your computer and use it in GitHub Desktop.
取得網頁捲動的y軸座標
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getScrollTop = function () { | |
return win.pageYOffset || doc.compatMode === "CSS1Compat" && doc.documentElement.scrollTop || doc.body.scrollTop || 0; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment