开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜