How To Check/Uncheck A Checkbox Using Jquery




Here we consider how to Check/Uncheck A Checkbox Using Jquery. The version of Jquery that you are using is cCheck/Uncheck A Checkbox Using Jquery - Jquery version below 1.6ritical here. If the Jquery version is 1.6 or above, then we can depened on Jquery prop. If the Jquery version is lower than 1.6, then we can depened on Jquery attr. Lets consider them in detail.




If the version of Jquery is 1.6 or above, we can use Jquery prop as follows.

$('#CheckboxID').prop('checked', true);
$('#CheckboxID').prop('checked', false);






If the version of Jquery is lower than 1.6, we can use Jquery attr as follows.

$('#CheckboxID').attr('checked', true);
$('#CheckboxID').attr('checked', false);



By this way we can Check/Uncheck A Checkbox Using Jquery