second click on sort button does not work

second click on sort button does not work

SuperCedSuperCed Posts: 2Questions: 0Answers: 0

Hi,
I use datatable on my website.
I use a very simple code in order to sort my data.
The first click, it works well, the second click does not work.

I have 2 tables on my page.

When I set bStateSave to true, sometimes it works sometimes not...

here is the code :

jQuery('.sort-table,.sort-table-header').DataTable( {
"bSort":true,
"aoColumnDefs": [ {
"aTargets": [0],
"bSortable": false
} ],
"bFilter":false,
"bPaginate": false,
"bLengthChange": true,
"bStateSave": false,
"bInfo": false,
"bAutoWidth": false,
"bDestroy": true

    } );

Thanks!

Replies

  • SuperCedSuperCed Posts: 2Questions: 0Answers: 0

    [RESOLVED] So you must not do that :
    jQuery('.sort-table,.sort-table-header').DataTable();

    you must do :
    jQuery('.sort-table').DataTable();
    jQuery(',.sort-table-header').DataTable();

This discussion has been closed.