开发者

Why to scroll webpage to top, i need to scroll the $("html")

i am referencing the code from snipplr

$('html, body').animate({scrollTop:0}, 'slow');

i found out actually i need to use $('html'), $('body') does not work, $('html, body') seems redundant开发者_开发技巧?


According to this blog post (update 4) it's because html works for IE in standards mode and body works in quirks mode.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜