I have a function called on the click of a link within a TD. Upon clicking, I traverse back up the DOM to the TR that the link was within, then create a new TR after it.
So far so good.
Now that I've created that new TR, with a TD within, what's the best to now refer to that newly created TD. Or, do I need to traverse my way back into the new TD I created back from the original clicked object?
$("td.expandable a").click(function(){
// figure out the number of columns we need to span
var colspan;
colspan = $(this).parents("tr").children("td").size();
// insert the new TR
$(this).parents("tr").after("<tr><td colspan=' & colspan & '></td></tr>");
// **what syntax would I use here to refer to the above made TD?**
return false;
});