10 examples of 'jquery if checkbox is checked' in JavaScript

Every line of 'jquery if checkbox is checked' 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
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}
191function isChecked(checkboxElement) {
192 return checkboxElement.hasClass(CHECKED_CSS);
193}
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}
12function uncheckCheckBox(checkbox){
13 $(checkbox).removeAttr("checked");
14}
78function set_checkbox_value(id, value) {
79 $('#' + id).prop('checked', value);
80}
110function isChecked(id,name){
111 var elem = goog.dom.getElement(id);
112 return elem.checked;
113};
23public isChecked(): boolean {
24 return !!this.select('CHECKED_RADIO_ICON');
25}
74function set_radio_checked(id) {
75 $('#' + id).prop('checked', true);
76}
631function GetFancyCheckboxState( id )
632{
633 var input = $J( '#' + id + '_input');
634 var bChecked = false;
635 if ( input.is(":checkbox") )
636 bChecked = input.is( ':checked' );
637 else
638 bChecked = (input.val() == "true" || input.val() == "1" || input.val() == 'on');
639
640 return bChecked;
641}
187function isChecked($domNode) {
188 return $domNode.checked;
189}

Related snippets