Pagination problem, function works only on the first page
Pagination problem, function works only on the first page
Hi,
First of all, thank you for DataTables. I love it. But to the point :)
I noticed that when i try to call a function
[code]$("#table tbody tr").click( function () {
trNumber = oTable.fnGetPosition( this );
alert("tr #: "+trNumber);
});[/code]
it works only on the first 10 rows (by default 10 rows are shown on 1 page). When I click next page this function doesn't work, nor when I change to display more than 10 rows at once. I was looking for that for couple hours but can't find answer. Hope that you can help me, thank you :)
First of all, thank you for DataTables. I love it. But to the point :)
I noticed that when i try to call a function
[code]$("#table tbody tr").click( function () {
trNumber = oTable.fnGetPosition( this );
alert("tr #: "+trNumber);
});[/code]
it works only on the first 10 rows (by default 10 rows are shown on 1 page). When I click next page this function doesn't work, nor when I change to display more than 10 rows at once. I was looking for that for couple hours but can't find answer. Hope that you can help me, thank you :)
This discussion has been closed.
Replies
Please have a look at the two event application examples:
http://datatables.net/examples/advanced_init/events_pre_init.html
http://datatables.net/examples/advanced_init/events_post_init.html
Regards,
Allan
Now everything works, thank you.