小智 0
我使用 jquery floatThead
http://mkoryak.github.io/floatThead/#intro
我必须使用一些 jquery 将第一行转换为标题才能工作。
下面的例子:
$(document).ready(function () {
var $theadCols = $("#ContentPlaceHolder1_grdCashflow tr:first-child"),
$table = $("#ContentPlaceHolder1_grdCashflow");
// create thead and append <th> columns
$table.prepend("<thead/>");
$table.find("thead").append($theadCols);
// init stickyHeader
$table.floatThead();
//$table = $("#ContentPlaceHolder1_grdCashflow");
$table.dataTable(
{
"paging": false,
"ordering": false,
"dom":'<"top"fi>rt<"bottom"><"clear">'
}
);
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
37466 次 |
| 最近记录: |