diff --git a/booking.js b/booking.js index 3c4e0a1..1503c49 100644 --- a/booking.js +++ b/booking.js @@ -8,10 +8,10 @@ Drupal.ajax.prototype.commands.bookingAjaxCheckboxes = function(ajax, response, //.prop() doesn't exist in Drupal's old version of jQuery so use .attr() instead if ($.inArray($(this).val(), arr) != -1) { $(this).attr("checked", "true"); - $(this).addClass("selected"); + $(this).closest('tr').addClass("selected"); } else { $(this).attr("checked", "false"); - $(this).removeClass("selected"); + $(this).closest('tr').removeClass("selected"); } }); });