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
精彩评论