If there is no pagination in JQuery datatable(inside accordion) and user expands the accordion, it takes huge time for seeing the datatable

只愿长相守 提交于 2020-01-06 03:01:24

问题


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..

来源:https://stackoverflow.com/questions/35131580/if-there-is-no-pagination-in-jquery-datatableinside-accordion-and-user-expands

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!