I generate a table dynamically out a database, receive the data in JSON and put it into a table. Every table row got a unique IDID, which is needed for further actions, so, if the DOM is altered you need a different approach:
$("table").delegate("tr", "click", function() { var id=$(this).attr('id'); alert("ID:"+id); });