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

112
Vistas
How do I Scroll parent page to a Hashtag when child page is click within iframe?

When I use window.parent.scrollTo(0,0) it works perfectly to the top of the parent page. But, when I need to go to a specific element, I can't figure out how to do so. I have tried window.parent.scrollTo('#xyz') and window.parent.scrollTo($('#xyz')), but neither work.

Currently I'm using window.parent.scrollTo(0,2500) but it has issues on different device types.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

scrollTo() can only scroll to a specific pixel from the top. The distance between the top of the page and the top of any element can be found in jQuery with element.offset().top. Combine the two:

window.parent.scrollTo(0, $('#xyz').offset().top)
about 4 years ago · Juan Pablo Isaza Denunciar
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