In given example, I can select/deselect each row on clicking on checkbox from td, but how to select/deselect all rows on click id="selectAll"
from th
JS :
$(document).ready(function () {
$("input[type='checkbox']").change(function (e) {
if ($(this).is(":checked")) {
$(this).closest('tr').addClass("warning");
} else {
$(this).closest('tr').removeClass("warning");
}
});
});