jQuery does not have a parent selector, but has a parent function .
In addition, tr is not the direct parent of the link. Instead, it is two levels up ( td is the first parent)
$("a.removerow").click(function(){
If there are no other tr in the hierarchy, you can also use
$("a.removerow").click(function(){
If tr has a class on it, you can do this:
$("a.removerow").click(function(){
source share