I am trying to animate all LI in a sequence, but the code is animating all LI at once.
I could not find a useful reply anywhere, I know how to do this in Jquery, but something does not add up here.
I have tried to add the Timeout to the eventhandler and the called function, both approaches do not work.
This is the function
function changeLi() {
setTimeout(function() {
[].forEach.call(li, function(li) {
li.style.transform = "translateX(200px)";
}, 900);
});
}
Link to codepen:
http://codepen.io/damianocel/pen/PzYXmv
I have tried to add stopPropagation/preventDefault to the call, but that did not help either.