Created
May 8, 2011 16:48
-
-
Save seungjin/961491 to your computer and use it in GitHub Desktop.
scratch.. getting scroll position/location
This file contains hidden or 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
<html> | |
<script> | |
var scrollCheck = function() { | |
var vscroll = (document.all ? document.scrollTop : window.pageYOffset); | |
console.log(vscroll); | |
} | |
</script> | |
<body onscroll=scrollCheck()> | |
<div id="myloop"> | |
</div> | |
</body> | |
<script> | |
for (i=0;i<=50;i++) { | |
document.getElementById("myloop").innerHTML+="aaa<br/>" | |
} | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment