I have a jQuery code here:
jQuery(document).ready(function () {
$("td").click(function (e) {
var chk = $(this).closest("tr").find("input:checkbox").get(0);
if (e.target != chk) {
chk.checked = !chk.checked;
}
if ($(this).closest("tr").find("input:checkbox").is(":checked")) {
$(this).closest("tr").css("font-weight", "bold");
} else {
$(this).closest("tr").css("font-weight", "");
}
});
});
As you can see I have a lot of checkboxes and on click on any td it's checked and adding css.
It works fine. What I want, is in the same form I also have a lot of select boxes.
When I try to choose something the function works.
I want to disable the function on click on the select box because I want to choose not to enable the checkbox.