Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Gary Horsman

GSAP compatibility with Bootstrap 3

Recommended Posts

Hi again.

 

Getting my feet wet with Bootstrap v.3.2.0. I set up a responsive web page with LESS and then wanted to incorporate some animation using GSAP, but no matter what I've tried, I've seen no animation or any evidence that GSAP functions inside a Bootstrap layout.

 

Did I miss something? Is it the development environment? Did I not load the various CDNs or styles in the proper order?

 

Revised Codepen: 

See the Pen gJmft by garyhorsman (@garyhorsman) on CodePen

Link to comment
Share on other sites

It looks like you had an error in your JS - you were using the wrong capitalization in getElementById(). You used a capital "D". Wups :)

//BAD: 
var doughboy = document.getElementByID("imgDoughboy");
//GOOD:
var doughboy = document.getElementById("imgDoughboy");

And for the record, you could even let GSAP do the selecting for you:

TweenMax.from("#imgDoughboy", 2, {opacity:0});

Have fun!

  • Like 3
Link to comment
Share on other sites

Doggone it. It figures it would be a typo of all things.

 

Sorry for the hubbub. But thanks for answering quickly.

 

Kudos!

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