Cell selection doesn't work with pagination

Cell selection doesn't work with pagination

lwoodslwoods Posts: 11Questions: 0Answers: 0
edited April 2011 in General
Using the example from the DataTables site only works with the first page of a paginated table. I am assuming that something has to be reinitialized when you go to the next page but I can't find info about this.
The example from the DataTables site:
$('#list tbody td').click( function() {
var aPos=oTable.fnGetPosition(this);
var aData=oTable.fnGetData(aPos[0]);
aData[aPos[1]]='clicked';
this.innerHTML='clicked';
});

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    edited April 2011
    This is covered in the first FAQ: http://datatables.net/faqs#events

    Change

    [code]
    $('#list tbody td').click( function() {
    [/code]
    to

    [code]
    $('#list tbody td').live( 'click', function() {
    [/code]
    Where is this on the site, so I can change it?

    Allan
This discussion has been closed.