I ran into a very vague error while doing some simple jQuery DOM manipulation.
The line that triggered the error is the following:
$(this).closest(\'tr\')
// assign this to a variable var val = this; // Use $(val).closest('tr').remove(); // It worked for me
Instead of :
$(this).closest('tr').remove();