Jump to content
Search Community

Error: Can't find variable: TimelineMax

mr_a test
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

Hi,

 

I have a problem ... I have built some animation now with tweenmax which also work great (simple animations).

Now I wanted to build the next animation and get in this line:

var squareTl = new TimelineMax({paused: true});

an error message 

ReferenceError: Can't find variable: TimelineMax

On codepen everything works fine ... but locally comes only the error (i use VS)

 

I have copied the current version of TweenMax from here "https://cdnjs.com/libraries/gsap" and tested if it works if I link locally. but fail

    
        <!--Main JS -->
        <script src="js/app.js"></script>
        <!--TweenMax -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/TweenMax.min.js"></script>
        <!--<script src="js/TweenMax.min.js"></script>-->
        <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TimelineMax.min.js"></script>-->
       
        <!--jQeury -->
        <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
        <!-- Swiper JS -->
        <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css"></script>-->
        
        <!---------------------------------- JavaScript ---------------------------------->
    </body>
</html>

 

What I doing wrong? can anybody help me to fix this?

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