I am trying to check to see if one of these radio boxes is checked and, if it is, to uncheck it and check the next in line.
I'd like to repeat this process every 4 seconds.
<section class="cr-container">
<input id="select-img-1" name="radio-set-1" type="radio" class="cr-selector-img-1 radio-set" checked/>
<input id="select-img-2" name="radio-set-1" type="radio" class="cr-selector-img-2 radio-set" />
<input id="select-img-3" name="radio-set-1" type="radio" class="cr-selector-img-3 radio-set" />
<input id="select-img-4" name="radio-set-1" type="radio" class="cr-selector-img-4 radio-set" />
</section>
i tried something like this but it's not working
$(".cr-container input").each(function(){
setTimeout( function () {
requestFunction(data, function(status){
if ( status == 'OK' ) {
if ($(this).attr('checked')) {
$(this).next().prop('checked', true);
}
}
});
}, indexInArray * 400);
});
thisto refer to? can you set up a jsfiddle for testing please