Skip to content

Instantly share code, notes, and snippets.

@zmax
Created April 3, 2013 23:48
Show Gist options
  • Save zmax/5306517 to your computer and use it in GitHub Desktop.
Save zmax/5306517 to your computer and use it in GitHub Desktop.
取得網頁捲動的y軸座標
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