1

Please help me to come out of this

I have already this part:

$(':input[type=radio]',taskClass).not(':button, :submit, :reset, :hidden').val('')
.removeAttr('checked');
George
  • 36,413
  • 9
  • 66
  • 103
user3393003
  • 21
  • 1
  • 3

4 Answers4

2

Try this if radio button is deselected, then clear its value

if( $(':input[type=radio]').is(':checked') == false ) {

   $(this).attr('checked',false).val('');
}
sshet
  • 1,152
  • 1
  • 6
  • 15
0

You can use .prop():

$(':input[type=radio]',taskClass).not(':button, :submit, :reset, :hidden').val('').prop('checked',false);
Felix
  • 37,892
  • 8
  • 43
  • 55
0

Check out here is good post How to uncheck a radio button?

Use following syntax

 $(this).prop('checked', false);
Community
  • 1
  • 1
Pratik Joshi
  • 11,485
  • 7
  • 41
  • 73
0

I just located the radio buttons with the name

$("[name=radio-button-name]").prop('checked', false);
Kazeem Quadri
  • 247
  • 3
  • 5