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

108
Visualizações
How to use IntersectionObserver several times in different places

I have the following code which animates a section of my website (credit: https://www.youtube.com/watch?v=19jD-DcOBtQ&t=0s) I would like to add a new instance of this to animate another section of my site, with the class .team-container - how would I go about duplicating this for that section?

// JavaScript Document
const observer = new IntersectionObserver(entries => {
    entries.forEach(entry => {
        if(entry.isIntersecting){
        document.querySelectorAll(".animated")[0].classList.add("fadeInLeft");
        document.querySelectorAll(".animated")[1].classList.add("fadeInTop");
        document.querySelectorAll(".animated")[2].classList.add("fadeInRight");
    }
  })
})
observer.observe(document.querySelector(".about-container"));

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