js change

This commit is contained in:
Nathan Coad
2016-06-03 14:59:28 +10:00
parent 56054b763a
commit 875fa6e839

View File

@@ -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 //.prop() doesn't exist in Drupal's old version of jQuery so use .attr() instead
if ($.inArray($(this).val(), arr) != -1) { if ($.inArray($(this).val(), arr) != -1) {
$(this).attr("checked", "true"); $(this).attr("checked", "true");
$(this).addClass("selected"); $(this).closest('tr').addClass("selected");
} else { } else {
$(this).attr("checked", "false"); $(this).attr("checked", "false");
$(this).removeClass("selected"); $(this).closest('tr').removeClass("selected");
} }
}); });
}); });