J
J
jeffer_fl7p2018-12-23 22:57:30
css
jeffer_fl7p, 2018-12-23 22:57:30

Why is the animation not working properly?


I made just such an animation, when you switch to another tab, everything breaks, how can I fix this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jeffer_fl7p, 2018-12-24
@jeffer_fl7p

setInterval(function(){


  for(var pp = 0; pp < letters_word1.length; pp++){
    setTimeout(function(){
      if(letters_word1[y] == undefined) y = 0;
      letters_word1[y].classList.toggle("active");
      y++;
    }, 100 * pp);
  }

  for(var pp = 0; pp < letters_word2.length; pp++){
    setTimeout(function(){
      if(letters_word2[l] == undefined) l = 0;
      letters_word2[l].classList.toggle("active");
      l++;
    }, 100 * pp);
  }
  
}, 4000);

I solved the problem with the help of this js implementation

S
siarheisiarhei, 2018-12-24
@siarheisiarhei

Yeah, go - yourself and "finish it" ... Oh, what do you need ... "Delirium-smeared"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question