I have a function that I want to use deferred and promise to chain an animation.
The first animation is a type writer plugin, using https://github.com/stephband/jticker/blob/master/js/jquery.jticker.js. The second is a function that contains other animations.
What I want to do is run the first animation and when the animation is completed, run the second.
$(function () {
var ticker =setTimeout(runTicker(), 8000);
$.when(ticker).done(function(){
setTimeout(Other(),16000)});
});
function runTicker() {
$("#ticker").ticker({
cursorList: " ",
rate: 50,
delay: 18000
}).trigger("play").trigger("stop");
}
I have tried numerous examples of deferred, but still can't get it.
I finally cleared all the examples in order to get the ticker working again.
How would I use deferred and promise to run the Other() function?
Thank you