Skip to main content
added 2 characters in body
Source Link

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); }); 

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 ID, 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); }); 

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 ID, 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); }); 
Source Link
SMut
  • 301
  • 3
  • 2

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 ID, 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); });