Is it possible to uncheck a radio button based on class?
$('#button').click(function () {
$("input:radio[class^='.radio2']").each(function(i) {
this.checked = false;
});
});
JsFiddle = http://jsfiddle.net/nPgyd/1/
This doesn't appear to work.
HERE is your solution. You only need to remove the braces to compare the class
Working Demo
$("input:radio[class^=radio2]").each(function(i) {
This might be helpful for you.
$('#button').click(function () {
$("input:radio.radio2").each(function(i) {
$(this).attr('checked',false);
});
});
Check the link...
http://jsfiddle.net/nPgyd/13/
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