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

210
Vistas
jQuery scroll radio input into div to checked by default

I've a DIV (overflow-y:auto;) with some RADIOs input, and a radio checked by default.

How do I scroll automatically to the radio CHECKED?

The DIV is scrollable and shows radio four at a time.. Is it possible to scroll and show automatically radio checked, in the example "SEVEN", by default?

  1. ONE
  2. TWO
  3. THREE
  4. FOUR
  5. FIVE
  6. SIX
  7. SEVEN (checked by default)
  8. EIGHT
  9. NINE

Thanks!

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

0

you should give the radio button an id or class , something to identify it with, then you can do like this :

$('html, body').animate({
    scrollTop: $("#defaultRadio").offset().top //let's say your radio button has id="defaultRadio"
}, 1000);

this will do an animation of 1000 milliseconds ( 1 second ) towards your target div

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