3
How can I make a script in jquery
to increase an index to a certain number and then decrease one by one until zero.
I’m doing it the following way to increase but I would like that when it reached the 5 it would decrease until zero.
var index = 0;
setInterval(function ()
{
teste();
}, 10000, true );
function teste()
{
index++;
}
True, my (removed) response was bankrupt.
– bfavaretto
Actually, she would be alternating between 4 and 5 at the end... incidentally I had not noticed the function calling another function directly. I’ll improve on that answer!
– Miguel Angelo
Good solution
+1
– Sergio