Hello everyone,
I have a little Ionic2 project where I want to use some external Javascript functions to handle the animation of a circle. How can I insert and use this JS file inside the Typescript of Ionic2?
The Javascript file is something like this:
$("#start").click(function(){
$("#circle").animate({height: “250px”,width:“250px”},4001,color);
});
function color(){
$("#circle").css(“background”,"#CCCC99");
setTimeout(shrink,7000);
}
function shrink(){
$("#circle").css(“background”,"#D45757");
$("#circle").animate({height: “120px”,width:“120px”},8000,grow);
}
function grow(){
$("#circle").css(“background”,"#aa8cc5");
$("#circle").animate({height: “250px”,width:“250px”},4001,color);
}
Thanks in advance for your support!