I\'m creating a tags with this code:
$(\'#td\' + id).append(\'
You need to split it, like this:
$("#td" + id).append("");
and then select the new element
$("#td > p > a").click( function(){ //this now will be pointing to the selected element } )