Most likely, this is because your IDE does not know which this object belongs to the functions you use, therefore it gives you a hint that this may refer to a window object or other context.
By the way, your code can be rewritten to:
$(document).on("change", "#select-all", function() { $(this) .closest("table") .find("input[name='row-id']") .prop("checked", this.checked); });
VisioN
source share