Jump to content
Search Community

mhc

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by mhc

  1. Hey All,

     

    The following (attached codepen URL) doesn't work. The only way it works is if I use the TweenMax library. I cannot use that, because the file size is too large(108kb vs 20kb for TimelineMax).
     

    <div class="token"></div>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TimelineMax.min.js"></script>
    <script>
    
     var tl = new TimelineMax(); // TimelineMax fires an error.
    
     tl.to(".token",1,{x:100,alpha:0});
    
    </script>
    

    The above script fires an "Uncaught ReferenceError: TimelineMax is not defined". error 

     

    Very simple code. Why is timelineMax not working? I've tried downloading the library and running this same code locally too, which is what i would like to do in the final build. No luck.

     

    Any help would be much appreciated.

    Thanks.

    See the Pen mEGERb?editors=1111 by viewtifulmoejoe (@viewtifulmoejoe) on CodePen

×
×
  • Create New...