Show Details

Show Details

tzonesotzoneso Posts: 2Questions: 0Answers: 0
edited October 2012 in Bug reports
Hi,
I'm using the latest version of datatables and jquery ui but I've a problem using show details and pagination.
Using :
[code]
$('#example tbody td img').live('click', function () {
var nTr = this.parentNode.parentNode;
if ($(this).parent().attr('id') != 'empty'){
if ( this.src.match('details_close') )
{
/* Dettagli aperti - chiudili */
this.src = "../../img/details_open.png";
oTable.fnClose( nTr );
}
else
{
/* visualizza dettagli per questa riga */
this.src = "../../img/details_close.png";
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
}

});
[/code]
when i click on show details it work fine only in the first page, in the others pages if i click on details the table return to the first page but if i came back on the correct page i saw details shown.
I've tried 'on' instead of 'live' but the event click is attached only to the first page.
how can avoid this?

Replies

  • tzonesotzoneso Posts: 2Questions: 0Answers: 0
    edited October 2012
    Solved:
    in my [code]function fnFormatDetails ( oTable, nTr)[/code]
    i had this :[code]oTable.fnDraw(true);[/code] I remove it and now it work with 'live'.
    How could i do if i want to use on instead of live event?
This discussion has been closed.