The correct way to check checkbox on the DOM elements can be done using jQuery .prop or .attr method.
By using JavaScript’s “checked” property, we can solve the problem directly, instead of manipulating the DOM into doing what we want it to do.
After jQuery version 1.6 you can use:
$('.chkID').prop('checked', true);
$('.chkID').prop('checked', false);
And jQuery version 1.5x and below you can use:
$('.chkID').attr('checked', true);
$('.chkID').attr('checked', false);
Read: jQuery Checkbox checked property
This plugin will alter the checked property of any DOM elements selected by jQuery, and successfully check or uncheck checkboxes under all circumstances.
For any types of queries, you can contact us on info[at]namasteui.com.
Introduction: As the chill of winter settles in or a bout of cold weather strikes,…
Nestled along the glittering waterfront of the City of Gold, Dubai Marina beckons to discerning…
When was the last time you heard that a clone app like Gojek could efficiently…
The e-commerce market is growing and evolving at a rapid pace. More and more people…
IplWin stands as a reliable and enthralling platform for Indian punters, offering a captivating blend…
Introduction In today's online age, consumers are constantly bombarded with information. They crave valuable content…