开发者

Return back to scroll position before Ajax request

开发者 https://www.devze.com 2022-12-19 07:03 出处:网络
I use to jquery\'s ajax function to update a div 开发者_如何学JAVAon my page. Everything works fine, except my page is scrolled up.

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.

0

精彩评论

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

关注公众号