couple of things that i changed:
.add is meant to add every element that matches the selector which was passed as an argument to the jQuery object it is called from.
So if you take the following code
- $(".input").add("p.output");
the resulting jQuery object would "contain" all the <input> elements and all the <p class="output"> elements
the table wasn't closed which can cause unexpected behavior.
And i used .parent because you can't add <td>'s in <td>'s