<input id="myCheckbox" type="checkbox" /> Please, please check me
<input id="myRadio" type="radio" /> Am I selected ?
I would like the following behavior:
How will I do this in a very simple way ?
Thank you in advance for your effort to respond.
$('#myCheckbox').click(function() {
if ($(this).is(':checked')) {
$('#myRadio').attr('checked', 'checked');
} else {
$('#myRadio').removeAttr('checked');
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With