Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

51
Visualizações
How to fadeIn/fadeOut every 3 elements

I have a list of words. The words are in groups of 3 and the last one is a group of 4 words. I want to fadeIn and fadeOut each word like so:

-Word 1 appears, 0.5s later word 2 appears, 0.5s later (so 1s after word 1) word 3 appears.

-Word 1 disappears and instantly word 4 appears taking the place of word 1. Then word 2 disappears and instantly word 5 appears taking the place of word 2, and so on.

I want to display/show always 3 words (and 4 for the last group). I tried to do it, but the first word of each group disappears when the second appears and so on, and I need the first word of each group to hold till the last word of the group appears and then the first word of the next group takes the place of the first word of the previous group in a loop. I hope I was clear enough. Here you have an approach of what I have done.

https://codepen.io/andrecode/pen/qBmQwYe

<div id="words">  
<div>
  <span>Prévention</span>
  <span>Ray Charles</span>
  <span>Elvis Presley</span>
</div>
<div>
  <span>Sam Cooke</span>
  <span>John Lennon</span>
  <span>Marvin Gaye</span>
</div>
<div>
  <span>Bob Dylan</span>
  <span>Otis Redding</span>
  <span>Stevie Wonder</span>
</div>
<div>
  <span>James Brown</span>
  <span>Paul McCartney</span>
  <span>Little Richard</span>
  <span>Roy Orbison</span>

Thank you in advance!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda