Event and dinamoc elements in the table

Event and dinamoc elements in the table

alfonsoalfonso Posts: 1Questions: 0Answers: 0
edited July 2010 in General
The problem that i found is when you define a event for example

[code] $('#tabla tr').click( function() {
alert("me hiciste click");
} );

[/code]

the event run with the tr element that exist before the $('#tabla').dataTable(...) invocation
, the tr element that the "sAjaxSource": 'json_source.txt' create dont have the event

the same when you add rows with [code]table.fnAddData( ...)[/code]. This rows dont have the event

I found but i dont have the solution.

Thank

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Please see the FAQ about events: http://datatables.net/faqs ( Q. My events don't work on the second page ). This apples here also.

    Allan
This discussion has been closed.