开发者

Jquery with datatables plugin

开发者 https://www.devze.com 2023-02-07 04:14 出处:网络
I\'m using datable plugin (http://datatables.net/examples/) with pagination in my project. I have 5000 entries in my database.

I'm using datable plugin (http://datatables.net/examples/) with pagination in my project. I have 5000 entries in my database.

How I can perform my data lazy 开发者_运维问答loading? For example on the first pagination page load only 100 entries; on the second, another 100 etc.

Thanks.


You can set the pagination trough the option "iDisplayLength":

$(document).ready( function() {
    $('#example').dataTable( {
        "iDisplayLength": 100
    } );
} )

Documentation: http://datatables.net/usage/options#iDisplayLength

0

精彩评论

暂无评论...
验证码 换一张
取 消