I have to clear multiple setTimeout functions
$('#stop').click(function(){
clearTimeout(anim1);
clearTimeout(anim2);
clearTimeout(anim3);
clearTimeout(anim4);
clearTimeout(anim5);
clearTimeout(anim6);
clearTimeout(anim7);
clearTimeout(anim8);
clearTimeout(anim9);
clearTimeout(anim10);
});
Is there any way to short this code something like clearTimeout(anim1,anim2,anim3...);
I have already tried this with coma separation but it doesn't work that way.