I have to use $('html, body').animate()
to make the snippet fully cross-browser compatible, but this is inconvenient when chaining animations as they will sometimes act on both <html>
and <body>
.
IE8 depends on having 'html' while Chrome or Safari depend on having 'body', so therefore i must include both.
Why the discrepancy?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…