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.
People usually stumble onto the 461 visa when they realise there’s no simple way to…
In today’s digital era, people look for convenience, transparency, and genuine rewards from their financial…
If you are planning to start a lighting business and looking for a supplier of…
If you are a copywriter or a content marketer, you will second my statement that…
Motorcycle accidents often lead to severe injuries because riders have minimal protection compared to drivers…
No business owner starts his or her business with the hope of making losses. Everyone…