2015-05-09 61 views
0

如何配置Jquery的數據表不加載的所有內容第一次加載jQuery的數據表動態分頁

e.g如果我有記錄,數據表將加載所有在第一次加載這可能是沉重的,但。點擊分頁部分時如何加載每個內容?像This

$(document).ready(function() { 
    $('#example').dataTable({ 
    "bServerSide": true, 
    "sAjaxSource": "xhr.php" 
    }); 
}); 

沒有爲喜愛分頁請讓我知道,如果我的問題是重複的,就罵了服務器端的配置。

+0

http://mobisoftinfotech.com/resources/blog/web-programming/jquery -datatable-ajax-tutorial-with-example-project/ –

回答

0

入住這裏全jQuery的例子 jquery-datatable-ajax-tutorial-with-example

var studentTable; 

jQuery(document).ready(function() { 

studentTable = jQuery('#studentListTable').dataTable({ 
"bJQueryUI" : true, 
"sPaginationType" : "full_numbers", 
"bRetrieve" : true, 
"bFilter" : true, 
"iDisplayLength": 10, 
"bProcessing" : true, 
"bServerSide" : false, 
"aoColumns" : [ { "bSearchable" : false,"bVisible" : false, 
"asSorting" : [ "asc" ] }, 
{"sWidth" : "20%","bSortable" : true }, 
{"sWidth" : "20%","bSortable" : true }, 
{"sWidth" : "20%","bSortable" : true }, 
{"sWidth" : "20%","bSortable" : true }, 
{"sWidth" : "20%","bSortable" : true } 
] 
}); 

jQuery(".ui-corner-br").addClass('ui-widget-header_custom '); 
});