having issue - is not function error, with my code, here it is:
import $ from 'jquery';
import gsap from 'greensock';
class IntroAnimations{
constructor(){
this.ctaEnter = $('#cta-enter');
this.loadContent = $('.center-h-v');
this.tlLoading = new TimelineLite();
this.animationTime = .5;
this.ctaEnter.click(function(){
this.removeLoadContent(); //<- error is here
})
}
removeLoadContent(){
TweenLite.to(this.loadContent, this.animationTime, {autoAlpha: 0})
}
}
export default IntroAnimations;
Error is when I call this.removeLoadContent(); Can someone help me explain why this is causing an error?
Thank you.