I put the following CDN code in my HTML file and then executed TimelineLite function in javascript.
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/TweenLite.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/TimelineMax.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/easing/EasePack.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/plugins/CSSPlugin.min.js"></script>
<My javascript code>
start = ()=> {
let loader = document.getElementById('loading'),
loadContents = document.getElementsByClassName('loading_content'),
tlLoader = new TimelineMax();
// Loader Timeline
tlLoader
.staggerFromTo(loadContents, 0.3,
{y:0, autoAlpha: 0},
{y:20, autoAlpha: 1, ease:Back.easeInOut},
0.05
)
.fromTo(loader,0.3,
{autoAlpha: 1, scale: 1.3},
{autoAlpha: 0, scale: 1, ease:Power0.easeNone},
0.9
);
}
start();
Then... the following error appeared in Console.
Why is this happening?
I guess I add the CDN code incorrectly, so I change to another CDN
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.2/TweenMax.min.js"></script>
and tried to use changed TimelineMax to TimelineLite in my javascript code.
but this problem is still happening now.
plz.. help me