Check checkbox with tr element

To check a checkbox after clicking a table’s tr element, do the following:

  checkbox = $(this).find("input:checkbox");
    if($(checkbox).prop("checked") == true){

By retaining the event in the callback function, we’re able to ensure the clicked element is not the checkbox itself. This will solve the issue of effectively clicking the checkbox twice and reverting the intended functionality.

Leave a Reply

Your email address will not be published. Required fields are marked *