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