Return back to scroll position before Ajax request
I use to jquery's ajax function to update a div 开发者_如何学JAVAon my page. Everything works fine, except my page is scrolled up.
I need somehow return to the updated div position. Any suggestions ?
Your page shouldn't be scrolled up when you update a DIV.
Are you sure you're not using a link with href='#'
? Because that will scroll you to the top of the page. In that case, make sure you return false;
in the onclick
part of the link.
精彩评论