Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

display all table records on multiple tables

$
0
0
Hi, on my site i have tabs where I'm loading different tables, but with the same configuration. According to documentation, I'va tried to simplify the js so with this
$(document).ready(function() {
    $('.user-account .dataTable').dataTable();
} );

and this is my code for displaying all records on one table
$('.user-account #my_table a.pagination-all').click( function () {
    var oSettings = my_chips_table.fnSettings();
    if($(this).hasClass('clicked')){
        oSettings._iDisplayLength = 10;
    }else{
        oSettings._iDisplayLength = -1;
    }
    my_chips_table.fnDraw();
});
and this works, but when I try to replace first line with this
$('.user-account .dataTable a.pagination-all').click( function () {
It doesn't work. So could You help me to make this work with multiple tables?

Viewing all articles
Browse latest Browse all 1816

Trending Articles