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

165
Views
¿Cómo saber si el usuario se ha desplazado debajo del encabezado?

Hay un encabezado dinámico complejo. Al hacer scroll, es necesario que su parte (piso medio) siga al usuario. Necesito averiguar en qué punto desaparece este piso intermedio del campo de visión del usuario (altura de la pantalla) y cuándo vuelve a la parte superior. ¿algunas ideas? Sin jQuery pls

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Aquí está con IntersectionObserver:

 window.onload = () => { const options = { root: null, rootMargin: '0px', threshold: 0 } const observer = new IntersectionObserver((entries, observer) => { console.log('Scrolled'); }, options); let header = document.querySelector('header'); observer.observe(header); }
 * { margin: 0; padding: 0; } body { height: 150vh; } header { height: 150px; background-color: orangered; }
 <header> Here header </header>

about 4 years ago · Juan Pablo Isaza Report
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!