10 examples of 'how to uncheck radio button in jquery' in JavaScript

Every line of 'how to uncheck radio button in jquery' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
12function uncheckCheckBox(checkbox){
13 $(checkbox).removeAttr("checked");
14}
74function set_radio_checked(id) {
75 $('#' + id).prop('checked', true);
76}
42function checkRadioButton() {
43 document.getElementById('control2').setChecked(true);
44}
3function check_checkbox (checkbox) {
4 if (checkbox.prop('checked')) {
5 checkbox.parents('label.checkbox').addClass('checkbox_state_cheked');
6 } else {
7 checkbox.parents('label.checkbox').removeClass('checkbox_state_cheked');
8 }
9}
49function disableSelect(chkbox) {
50 var sibling = chkbox;
51 while (sibling != null) {
52 if (sibling.nodeType == 1 && sibling.tagName.toLowerCase() == "select") {
53 $(sibling).prop('disabled', !chkbox.checked);
54 }
55 sibling = sibling.previousSibling;
56 }
57}
69function checkRadioButton( name, value ){
70 var radiobuttons = document.querySelectorAll('input[name="'+name+'"]')
71 for( let i = 0, lg = radiobuttons.length; i
84checkDisabled() {
85 if (this._input.disabled) {
86 this._element.classList.add(CLASS_IS_DISABLED);
87 } else {
88 this._element.classList.remove(CLASS_IS_DISABLED);
89 }
90}
74function setCheckedValue(radioObj, newValue) {
75 if (!radioObj)
76 return;
77 var radioLength = radioObj.length;
78 if (radioLength == undefined) {
79 radioObj.checked = (radioObj.value == newValue.toString());
80 return;
81 }
82 for (var i = 0; i < radioLength; i++) {
83 radioObj[i].checked = false;
84 if (radioObj[i].value == newValue.toString()) {
85 radioObj[i].checked = true;
86 }
87 }
88 }
70function handleToggle(radio) {
71 if (radio.value === "true") {
72 document.body.classList.add("bootstrap-grid--fluid-rows")
73 } else {
74 document.body.classList.remove("bootstrap-grid--fluid-rows")
75 }
76}
11function updateDeleteButtonAndCheckbox() {
12 var checkboxes = $('input[name="entity_key"]');
13 var checked_checkboxes = checkboxes.filter(':checked');
14
15 if (checked_checkboxes.length) {
16 $('#delete_button').removeAttr('disabled');
17 $('#delete_button').removeClass('disabled');
18 } else {
19 $('#delete_button').attr('disabled', 'disabled');
20 $('#delete_button').addClass('disabled');
21 }
22
23 $('#allkeys').attr('checked',
24 checkboxes.length == checked_checkboxes.length);
25}

Related snippets