Reputation: 629
I'm building a vertical ticker for a website. I've made a div of which I animate the scrollTop with jQuery. In between the scrolling I'd like to have a really slow animation downwards. The problem is that the slow animation doesn't go smoothly. So see it jump to every pixel.
Here is the demo: http://test.raapwerk.nl/popma/
Is there a way of making the slow animation in between run smoothly?
Thanks!
Upvotes: 0
Views: 5167
Reputation: 8520
Your duration is set so high that there are not enough pixels available for a smooth animation. If you set a duration of 8 seconds
for 20px
you can compare it to ~3fps
.
So the only way to get this smoother is to decrease your duration or increase your pixel distance.
I've made a small jsfiddle to demonstrate that: PROBLEM DEMO
Upvotes: 3