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