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

119
Views
intersection observer not working when element is half outside viewport

I am using fullpage js for single scroll effect on the page and using intersection observer to detect if the element is inside the viewport to add the animation class. The fadein animation from left and right is used and works on some elements. To do that I have classes as below:

.animate-x {
    opacity: 0;
    transform: translateX(-50%);
    transition: all .5s ease-out;
}

.fl {
    opacity: 1;
    transform: translateX(0);
}

using translateX(-50%) make some elements to set position outside the viewport which does not detected by the Intersection Observer. I suppose this should not have happen since I have used this kind of propertied for animation before.

link to repo: https://github.com/Trushar10/theinstock.git

link to site: https://theinstock.netlify.app/

In section 2 left first element with class description has animate-x class which should have fl class added when the it comes in viewport. on the right side the element with class ````benefitshas classfr``` added to fadein from right animation.

Check out the links if helps.

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!