Skip to main content

Bug Tracker

Side navigation

#14870 closed bug (notabug)

Opened March 07, 2014 07:26PM UTC

Closed March 10, 2014 08:48PM UTC

Animate scrollTop Fails in Chrome

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0-rc1
Keywords: Cc:
Blocked by: Blocking:

jQuery versions tried: 1.11.0 & 2.0.3

My project requires 1.x for IE8 support

Browsers affected: Chrome, Opera, Safari, IE11

Works in: Firefox, IE8, IE9, IE10

OS's Tested on: MacOS (Chrome, Opera, Safari, Firefox), Windows XP (IE8), Win 7 (IE9, IE10, IE11)

I have an "a" element in my DOM with the id, say-hello. The intended affect is for when the user clicks it, the page scrolls down to the form for contacting us.

<script type="text/javascript">

    $('#say-hello').on('click', function(e){

      $('html, body').animate({
        scrollTop: $("#contact-us h2").offset().top
      }, 1000);


It works perfectly in firefox and the lower versions of IE. Perhaps it's related to webkit, but then again, it's not working IE11. In the head of the DOM, I have the following meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=edge">

That made it work in IE8, while fixing the overall look of the site.

I have been using jQuery for a year now and haven't had issues with scrollTo in the animate function. Not sure if this is a recent webkit update that has broken it.

Attachments (0)
Change History (3)

Changed March 10, 2014 02:22PM UTC by timmywil comment:1

owner: →
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the "jQuery(edge)" version to ensure the issue still exists—you may need to change this to a specific version depending on the test case.

To get you started, use the appropriate boilerplate:

Open the link and click to "Fork" (in the top menu) to begin.

Also, please read:

Additional resources:

Changed March 10, 2014 08:45PM UTC by anonymous comment:2

I realized I had some conflicting CSS. Sorry for the false bug report!

Changed March 10, 2014 08:48PM UTC by timmywil comment:3

resolution: → notabug
status: pendingclosed