Jump to content
Search Community

GSAP compatibility with Bootstrap 3

Gary Horsman test
Moderator Tag

Go to solution Solved by GreenSock,

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

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

  • Solution

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

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