Reading a Single Attribute Property in jQuery
You can not only change the values of attributes-properties, but also read them. For example, the input specifies the property disabled:
<input type="text" id="test" disabled>
We specify only the disabled property for the attribute, without boolean values:
alert($('#test').prop('disabled')); // will bring out 'true' - attribute is
Set all checked checkboxes to unchecked.
Set all unchecked checkboxes to checked.
Set all checked checkboxes to unchecked and vice versa.