If you are working with any form or datagrid on which you want to list/display a set of data. Then may be sometimes you need to use multiple checkbox checking and unchecking features with a single checkbox check and uncheck in a form.

You can do it easily with jQuery in 2 steps…
Step1: Give a class name for the checkbox which you want to use as parent of all.


Step2: Write this single line of code on javascript for above added classname.

$('.dcFormCheckboxTh').click(function () {
    $(this).parents('table:eq(0)').find(':checkbox').attr('checked', this.checked);
});