开发者

auto back to top in jquery

开发者 https://www.devze.com 2023-01-30 09:25 出处:网络
Does anyone there have any way that I can auto make the page back to top without refresh the page after a submit process is completed in开发者_如何学JAVA jquery?you can use this

Does anyone there have any way that I can auto make the page back to top without refresh the page after a submit process is completed in开发者_如何学JAVA jquery?


you can use this

$("#divid").scrollTop(0);

if you wnat the body do this

$("html,body").scrollTop(0);

made a sample here, scroll down there is a scroll top text ,click that

http://jsfiddle.net/D5x7F/


window.location='#'

Now it's not jquery but it's easy javascript and you can call this after your jquery is done.

0

精彩评论

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

关注公众号