I have 2 radio buttons. From a selection on the first, I would like to populate the second. The script I have works the first time through, but if I change my mind, it doesn't go back through.
Here is my script:
$(document).ready(function() {
var $radio = $('#q14');
// Change Radio Button 2 - Read only based on radio button
$($radio).on('change', function () {
if($('input[value="1"]').is(':checked'))
{
$('.radio2').find($('input[value="choice 1"]')).attr('checked', true);
}
else if($('input[value="2"]').is(':checked'))
{
$('.radio2').find($('input[value="choice 2"]')).attr('checked', true);
}
else if($('input[value="3"]').is(':checked'))
{
$('.radio2').find($('input[value="choice 3"]')).attr('checked', true);
}
});
});