Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("button").each(function(index){
- // add the class
- setTimeout(function(){
- $(this).addClass("varrimento");
- }.bind(this),index*5000);
- // remove the class
- setTimeout(function(){
- $(this).removeClass("varrimento");
- }.bind(this),(index+1)*5000);
- });
- var timerId = setInterval(function () {
- //Faz alguma coisa aqui!
- if(condicao == true){
- //Termina a execução
- clearInterval(timerId);
- }
- },5000);
Add Comment
Please, Sign In to add comment