开发者

Is there a JQuery plugin that lets the browser scroll down to 200 pixels from the current position, smoothly?

开发者 https://www.devze.com 2023-01-31 13:38 出处:网络
Th开发者_运维技巧e plugin should make the scroll bar go down 200 pixels, from the current position. But very smoothly, and kind of cool too ,but not too much.You don\'t need a plugin for that purpose,

Th开发者_运维技巧e plugin should make the scroll bar go down 200 pixels, from the current position. But very smoothly, and kind of cool too ,but not too much.


You don't need a plugin for that purpose, just use jQuery's .animate():

$(window).animate({scrollTop: '+=200'}, 2000);

You can replace window with any element/node that owns a scrollbar. has a scrollable content.

Ref.: .animate()

Example: http://www.jsfiddle.net/4yUqL/28/


Cool, but not too cool: http://flesler.blogspot.com/2007/10/jqueryscrollto.html

Demos: http://demos.flesler.com/jquery/scrollTo/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号