window.something.updateStatus = function(theName) {
$('#myTable').children('tr').remove(":contains('theName')");
};
Obviously the above does not work because it is looking for a string called “theName” in any in myTable.
What I’d like to do is pass in theName’s Value to the contains.
How do I evaluate this expression?
Thanks.
This is untested, but should work:
Essentially it removes the variable
theNamefrom the string, but still quotes that value (once the variable’s interpolated), which is why there’s an opening, and closing,'either side of the variable and+concatenation operators.