Jump to content
Search Community

Any Firefox functionality issues for on-load animation?

Haikukitty test
Moderator Tag

Go to solution Solved by Rodrigo,

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

I have another question, and it might be something I'm doing wrong - but my on-load rotation works perfectly in chrome and safari, but does not work in Firefox. My on-click rotation works in all three.


Is there a known firefox issue? Or do I need to use a different syntax to run the animation on page load in all browsers?



See the Pen ogbNaj by anon (@anon) on CodePen

Link to comment
Share on other sites

  • Solution



As far as I can tell there shouldn't be much of a problem with firefox and the load event. Although I would recommend you to use the onload event and not jQuery's load, since is not very recommended for this uses. Basically preload the image using JS and then call the event handler:

var img = new Image();

img.src = "path/to/your/image.jpg";

img.onload = function(){

  TweenMax.fromTo('#wheel', 3, {rotation:0}, {rotation:792});


That should work on all major browsers.



  • Like 1
Link to comment
Share on other sites

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...