Showing posts with label setinterval. Show all posts
Showing posts with label setinterval. Show all posts

Thursday, January 12, 2012

Simulate top scroll using javacsript setInterval & clearInterval


I want to simulate scroll by moving body/html frame to the top/upwards by arbitrary amount. I know jQuery scroll or animate function, .scroll() and .animate() . But I have decided not to use it since it caused conflict between scrollTop property in animate and .scroll() jQuery native function when the animation happens and is still ongoing AND the .scroll gets called..