If there is no pagination in JQuery datatable(insi

2019-08-06 10:46发布

问题:

An accordion contains a JQuery datatable which has more than 100 rows. When user expands the accordion it takes a lot of time for making the datatable visible.

Here is the details:
// declaration of dataTable Properties

var dataTableProperties = {"bPaginate" : true};

//initialztion of dataTable object

var $table = $('#table').DataTable(dataTableProperties);

//On button click, that toggles to "view All pages"/"add pagination", the code is as:

if(dataTableProperties .bPaginate)
dataTableProperties.bPaginate = !dataTableProperties .bPaginate;

Now, on accordion click I am just showing/hiding the accordion-contents. But it takes huge time, if the rowCount of the table is more than 100 and "bPaginate" property is false.

Please help me out.. Thanks in advance..