difference between $('html, body').animate and $('body').animate?
The reason you use a selector for BOTH $('html, body')
is because of web browser inconsistency. After a few tests I have found three things:
- The browsers
Firefox
&IE
utilize the html portion of this selector - Browsers in the "webkit class" eg:
Safari
andChrome
respond to the body. Although one can avoid the issue all together by using$(document)
instead.
There's also a ticket on the jQuery bug tracker specifically stating this issue here