开发者

Div overflow scroll with scroll control - JQuery

I have a div that has content loaded into it. If the user tries to load different content into it I want the div to scroll to the top of itself first. 开发者_Python百科This cannot be achieved by anchor tags and needs a bit of JQuery.

Any ideas?

Marvellous


Just call scrollTop on the element:

$('#scrollable_div').scrollTop(0);


Try to use ScrollTo plugin for jQuery.


jQuery scrollTo will be your best friend for doing something like this

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜