Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
63
rated 0 times [  65] [ 2]  / answers: 1 / hits: 8867  / 10 Years ago, tue, april 1, 2014, 12:00:00

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);
}
});

More From » jquery

 Answers
0

You can try



$(document).on('dblclick','.className',function(){
if(this.checked){
$(this).prop('checked', false);
}
});


Demo: Fiddle


[#46390] Monday, March 31, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
katelinb

Total Points: 535
Total Questions: 104
Total Answers: 109

Location: Burkina Faso
Member since Sun, Jun 13, 2021
3 Years ago
katelinb questions
;