I am trying to check and uncheck a check box. this is my html code.
<input type="checkbox" id="isWorking" name="isWorking" />
i tried to do it with jquery this way,
$('#isWorking').val('1');
$('#isWorking').val('0');
How can I control checkboxes with jQuery?
Use .prop
method.
$('#isWorking').prop('checked', true); // check it
$('#isWorking').prop('checked', false); // uncheck it
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments