In a JS function using setIntervall, I want to perform a jquery animation every 10 loops (in the other 9 loops, other animations are being displayed).
I am using the variable i in my function and it increments +1 each loop. Is there a very easy way to check in javascript if i is a multiple of 10 (in order to perform my jquery animation)?
In PHP I would simply do if(($i % 10) == 0) … but I didn’t find it in JS.
Did you try it? I found a few sites that claim that the same operator
%will work in JavaScript.