Methods for animate () in jquery and $ ("body"). Animate ({"ScrollTop": Top}) is not resolved by Firefox support issues

Source: Internet
Author: User

The method of animate () in jquery can go to W3school view, here is the main point:

$ ("body"). Animate ({"ScrollTop": Top})

Not be solved by Firefox support problem.

In fact, the body is used:

$ ("body"). Animate ({"ScrollTop": Top})

Only supported by Chrome and not supported by Firefox .

Instead of using HTML :

$ ("html"). Animate ({"ScrollTop": Top})

Only supported by Firefox and not supported by Chrome .

If you want this JS to be supported by Chrome and Firefox , this should be the case:

$ ("Html,body"). Animate ({"ScrollTop": Top})

Just add both the HTML and the body to it.

Thank you!!!

Methods for animate () in jquery and $ ("body"). Animate ({"ScrollTop": Top}) is not resolved by Firefox support issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.