Verification: a143cc29221c9be0

Php check if checkbox checked not

jQuery Checkbox Checked

Use the function prop() to check the checkbox using its id.

$('#myCheckbox').prop('checked', true);

Check the Checkbox using its class.

$('.myCheckboxCss').prop('checked', true);

Have you read this tutorial on doing Multiple File Uploads simultaneously using JavaScript and also providing real time progress of the uploads to the user.

jQuery Uncheck Checkbox

In the same way uncheck this checkbox.

$('#myCheckbox').prop('checked', false);

Uncheck the Checkbox using its class.

$('.myCheckboxCss').prop('checked', false);

Don’t Use attr()

For jQuery 1.6+ the attr() function will no longer work for Checking and Unchecking Checkboxes, therefore use prop() in place of attr() in such situations.