gausie Posted March 7, 2008 Share Posted March 7, 2008 <script type="text/javascript"> function scrollPosition(){ if (navigator.appName == "Microsoft Internet Explorer"){ return document.body.scrollTop; }else{ return window.pageYOffset; } } function dirScrolling(prev) { var current = scrollPosition(); if (prev > current){ document.getElementById('c').innerHTML = "V"; }else if (prev < current){ document.getElementById('c').innerHTML = "^"; }else{ document.getElementById('c').innerHTML = "="; } t = setTimeout(dirScrolling(current),500); } </script> Why does this not change the div when I scroll? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.