Jump to content
Search Community

FireFox: Neither TweenMax ScrollTo nor jQuery scrollTop work

acidking
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Posted

On other browsers it works fine. I am new to Greensock, so I am not sure if there's a particular issue with FireFox?

 

This is the code I use:

function scroll0() { TweenMax.to($('body'), 2, {scrollTo:{y:0}}); }
Posted

When using 

function scroll0() { TweenMax.to($('html'), 2, {scrollTo:{y:0}}); }

it works in Firefox, but stopped working in Chrome

  • Like 2
Posted

Try

function scroll0() { TweenMax.to($("html, body"), 2, {scrollTo:{y:0}}); }

I've seen this is the way most jQuery plugins does the scroll  :)

Posted

I tried HTML and BODY together, it scrolls a couple of pixels and stops.

jamiejefferson
Posted

What about this?

TweenMax.to(window, 2, {scrollTo:{y:0}});
  • Like 2
Posted

Yes Jamie, this is it. Just took a look of my code 

 

TweenLite.to( window, 1, {scrollTo: {y: $(_section).offset().top - headerOffset, autoKill:false}, ease:Power2.easeOut, onComplete: onSelectionReached} );

 

Works great on Firefox. 

 

http://kabakum.panayotov-consult.com/bst2/ .

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...