+ 2
stop toggle
hi everybody, i have a toggle fucntion that show a div and hide another, after 5 seconds the div hidden is showen and the other is hidden. i want to stop the toggle function after a click inside the div and when i click a double click the toggle must play again. this is how a create the toggle: var intervalID = setInterval(function() { $("#mydiv2").toggle(); $("#mydiv1").toggle(); }, 5000); setTimeout(function() { clearInterval(intervalID); }, 30000);
2 Réponses
+ 2
And? Now write onclick func.
0
@lemuriec i used a sleep function but now i want to show a message without alert if a condition is realised.