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

177
Views
¿Se puede usar Intersection Observer para verificar si un elemento ha cruzado el medio de la ventana gráfica?

Entiendo cómo usar Intersection Observer para verificar si un elemento ingresó a la ventana gráfica, como el código a continuación:

 const el = document.querySelector('#el') const observer = new window.IntersectionObserver(([entry]) => { if (entry.isIntersecting) { console.log('ENTER') return } console.log('LEAVE') }, { root: null, threshold: 0.1, // set offset 0.1 means trigger if atleast 10% of element in viewport }) observer.observe(el);

¿Es posible detectar si el elemento cruzó el medio de la ventana gráfica ( '50vh' desde la parte superior)?

Si es así, ¿podría incluir un ejemplo de código para mayor claridad?

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!