I want this functionality:
When user clicks on already checked radio button, it should uncheck it.
I'm trying this code but no luck.
$(document).on('mouseup','className',function(){
if ($(this).is(':checked')){
$(this).prop('checked', false);
}
});
You can try
$(document).on('dblclick','.className',function(){
if(this.checked){
$(this).prop('checked', false);
}
});
Demo: Fiddle
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