10 examples of 'jquery uncheck checkbox' in JavaScript

Every line of 'jquery uncheck checkbox' 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}
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}
5function checkUncheck (checkbox) {
6 // body...
7 var property;
8 if ($(checkbox).is(':checked') == false){
9 $(checkbox).removeAttr("checked");
10 property = "uncheck";
11 }
12 else{
13 $(checkbox).attr("checked","");
14 property="check";
15 }
16
17 var notediv = $(checkbox).parents(".tab-pane");
18
19 var note_id = ($(notediv).attr('id'));// note id
20 var todo_item = ($(checkbox).parent().text()); // todo item text
21 var content_div = $(checkbox).parents(".note-content");
22 var body_html = content_div.html();// body_html of the note
23 var todo_item_id = $(checkbox).parent().attr("id");
24 console.log("id is "+ todo_item_id);
25 $.ajax({
26 url: "/checkuncheck/",
27 cache: false,
28 type: "POST",
29 data: {note_id : note_id, property: property, body_html: body_html, todo_item: todo_item,todo_item_id:todo_item_id},
30 success: function(result){
31 console.log(result);
32 },
33 error: function(result){
34 console.log(result);
35 }
36 });
37}
5function checkboxChanged(checkboxInput) {
6 var $rgbaInput = $(checkboxInput).siblings('input.cascade-rgba');
7 var $colorInput = $(checkboxInput).siblings('input[type="color"]');
8 if (checkboxInput.checked || checkboxInput.disabled) {
9 $rgbaInput.addClass('disabled');
10 $colorInput.addClass('disabled');
11 } else {
12 $rgbaInput.removeClass('disabled');
13 $colorInput.removeClass('disabled');
14 }
15}
86uncheck() {
87 const checkboxElement = this.shadowRoot.querySelector('input');
88 checkboxElement.checked = false;
89}
1function checkAll(checkbox, stub) {
2 c = 0;
3 for (i = 0, n = checkbox.form.elements.length; i < n; i++) {
4 e = checkbox.form.elements[i];
5 if (e.type == checkbox.type) {
6 if ((stub && e.name.indexOf(stub) == 0) || !stub) {
7 e.checked = checkbox.checked;
8 c += (e.checked == true ? 1 : 0);
9 }
10 }
11 }
12 if (checkbox.form.boxchecked) {
13 checkbox.form.boxchecked.value = c;
14 }
15 return true;
16}
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}
78function set_checkbox_value(id, value) {
79 $('#' + id).prop('checked', value);
80}
191function isChecked(checkboxElement) {
192 return checkboxElement.hasClass(CHECKED_CSS);
193}
212function updateCheckbox() {
213 $('#charts input, #components input, #coords input').each(function () {
214 $(this).attr('checked', $(this).parent().hasClass('checked'));
215 });
216}

Related snippets