you have to use the ‘prop’ function :
.prop('checked', true);
Before jQuery 1.6 (see user2063626’s answer):
.attr('checked','checked')
More Related Contents:
- How to retrieve checkboxes values in jQuery
- Get checkbox value in jQuery
- How to limit the number of selected checkboxes?
- jQuery if checkbox is checked
- Toggle Checkboxes on/off
- Get a list of checked checkboxes in a div using jQuery
- How do I check/uncheck all checkboxes with a button using jQuery?
- Using jquery to get all checked checkboxes with a certain class name
- calculate the number of html checkbox checked using jquery
- jQuery selector for the label of a checkbox
- Limit Checkbox amount
- jQuery, checkboxes and .is(“:checked”)
- How to handle change of checkbox using jQuery?
- jQuery checkbox event handling
- jQuery: make checkboxes act like radio buttons?
- Find all unchecked checkboxes in jQuery
- if checkbox checked add class to parent element
- check uncheck All checkboxes with another single checkbox use jquery
- Difference between .on(‘click’) vs .click()
- val() vs. text() for textarea
- jqgrid showLink
- Bootstrap 3 jquery event for active tab change
- How add spaces between Slick carousel item
- Simple jQuery Ajax call leaks memory in Internet Explorer
- JQuery change not firing until blur
- jQuery dataTable doesn’t show sort icon
- JQuery .load() callback function
- Backbone.js Event Binding
- Sending array data with jquery and flask
- How to make synchronous JSONP crossdomain call