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

209
Views
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 answers
Answer question

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 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!