Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
How to do responsive scroll event with CSS and JS

I'm trying to make a responsive scrollY event using JS. I would like to animate a div on mobile and desktop. The problem is that on mobile, the animation appear at scrollY 2000 and on desktop scrollY 2800.

How can I animate it on desktop devices ?

There is the code I would like to use but it's not working:

if( window.scrollY > 2000 || window.scrollY > 2800){
    percentDev.style.animation = "percentBareDev 2s forwards";
    percentTeam.style.animation = "percentBareTeam 2s 
    forwards";
    percentRewards.style.animation = "percentBareRewards  2s 
    forwards";
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda