Tell me how to make sure that by clicking again on the selected radio button, it again becomes not cheked. I understand that I was wrong somewhere in the code
$(document).ready(function(){ $('input[type="radio"]').click(function(){ var ir = $(this).prop("checked") if(ir){ $(this).removeAttr("checked") } }) }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <input id="check1" type="radio" name="group1" value="val1" checked> <label for="check1">Text1</label> <input id="check2" type="radio" name="group2" value="val2"> <label for="check2">Text2</label> <input id="check3" type="radio" name="group3" value="val3"> <label for="check3">Text3</label>