2012-07-11 48 views
1

嗨我正在使用Dragtable jQuery庫, 我看到您可以通過修改sDom屬性來自定義分頁部分。數據表jquery分頁和colreorder

  $('#example').dataTable({ 
       "sPaginationType": "four_button", 
       "bFilter": false, 
       "sDom": '<"top"lp<"clear">>rt<"bottom"i<"clear">>' 
      }); 

我希望在該表中包含colreorder功能。我知道這是sDom ...

"sDom": 'Rlfrtip' 

我如何包括這個,以便我有兩個sDom功能。

回答

2

你可以把中的R sDom的起始位置:

$('#example').dataTable({ 
    "sPaginationType": "four_button", 
    "bFilter": false, 
    "sDom": 'R<"top"lp<"clear">>rt<"bottom"i<"clear">>' 
}); 

http://datatables.net/usage/options#sDom介紹瞭如何使用sDom屬性。要啓用colResorder,只需在啓動時將(Rfip)設置爲默認值。這也是我所做的,我在問題中保留了你的訂單。

這些是其他字母的解釋:

'l' - Length changing 
'f' - Filtering input 
't' - The table! 
'i' - Information 
'p' - Pagination 
'r' - pRocessing