set checkbox checked jquery
//jQuery 1.6+ use
$('.checkbox').prop('checked', true);
//jQuery 1.5.x and below use
$('.checkbox').attr('checked', true);$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);//For jQuery 1.6 and above
$('#myCheckBoxID').prop('checked', true);
//For jQuery Before 1.6
$('#myCheckBoxID').attr('checked','checked');//jQuery 1.6+ use:
$('.checkboxClass').prop('checked', true);
//jQuery 1.5.x and below use:
$('.checkboxClass').attr('checked', true);$("#checkboxid").prop('checked', true); // Checks the box
$("#checkboxid").prop('checked', false); // Unchecks the box
$("#checkboxid").attr('checked', true);
Also in JavaScript:
- merge array in js
- js create array from for loop
- sort javascript array
- redux get state without store
- require a json as a string
- js random id
- node_modules/metro/src/lib/attachWebsocketServer.js
- oop js is
- cypress set viewport for all test cases
- mongodb gte
- javascript change class of item
- uncheck checkbox when another is checked javascript
- javascript Document word search and count
- c# loop through json
- concantene number in js
- example of validating fields on your own in express
- remove object from array javascript
- js object destructuring with defaults
- nested ternary operator javascript
- javascript remove duplicate strings from array
- node mailer office 365
- parse csv javascript
- regex for counting characters
- javascript date today dd mm yyyy