Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!