Athan Clark
Athan Clark

Reputation: 3980

GSAP TweenLite not animating basic quickstart example

I'm trying to get started with GSAP, but can't seem to get anything working yet. I've included TweenLite, the Easing and CSS plugins, and have very basic code, but I can't seem to get anything running. Here is my main javascript:

window.onLoad = function(){
  var logo = document.getElementById("logo");
  TweenLite.to(logo, 1, {
    left: "632px",
    onComplete: function(){
      console.log("completed anim");
    }
  });
}

You can see a running example at deconfigured.com (at the time of this post, it's on a personal server. I'll transfer it over to a jsfiddle after I make sure that my server software isn't the cause of the issue).

The console log never appears on my browser (latest firefox).

Is it just a silly error? Any help would be tremendous.

Upvotes: 1

Views: 295

Answers (1)

Niloct
Niloct

Reputation: 10015

Try window.onload, without caps: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onload

Upvotes: 1

Related Questions