Reputation: 64
I am making an info screen in jQuery and need the animation speed to be evenly through the whole animation. I am using this code:
$("#panel1").animate({
scrollTop: $("#panel1")[0].scrollHeight
}, 100000);
Upvotes: 1
Views: 472
Reputation: 337560
The third parameter of animate()
is the easing to use. By default it's swing
. You can change that to linear
, like this:
$("#panel1").animate({
scrollTop: $("#panel1")[0].scrollHeight
}, 100000, 'linear');
Upvotes: 1