Hi,
I am new to the Javascript could you please explain this 8 lines code for me Please.
<script type="text/javascript">
$(".chk").live("click", function () {
if ($(this).is(":checked")) {
if (!$(this).closest("tr").next().hasClass("child")) {
$(this).closest("tr").after("<tr class = 'child'><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>")
var index = $(this).next();
$(this).next().next().val(index);
}
} else {
if ($(this).closest("tr").next().hasClass("child")) {
$(this).closest("tr").next().remove();
}
}
});
</script>