fancytree ext-table:如何有一个固定的标题行

时间:2016-11-27 03:18:16

标签: fancytree

如何停止fancytree表上的标题行滚动 - 只允许数据行滚动?

这是我正在使用的HTML。

        <div id="scrollParent_history" style="height: 420px; overflow: auto;">
            <table id="lb_tree_bliss_history" class="lb_report_tree">
                <colgroup>
                    <col width="175px">
                    <col width="20px">
                    <col width="20px">
                    <col width="20px">
                    <col width="20px">
                    <col width="20px">
                    <col width="20px">
                </colgroup>
                <thead>
                  <tr> <th>Date</th> <th>First</th> <th>max</th> <th>Min</th> <th>Final</th> <th>Activities</th> <th>Change</th>  </tr>
                </thead>
                <tbody></tbody>
            </table>
        </div>

2 个答案:

答案 0 :(得分:1)

Fancytree对表头没有任何特殊之处,所以你可以使用任何现有的jQuery固定表头插件。

(注意:检查每个知道的project page可能是值得的,因为这个功能可能会在某个时候成为本地Fancytrtree扩展。)

答案 1 :(得分:0)

如果它帮助任何人我使用的是floatThead,它与fancytree 2.21.0很好地配合使用。可在GitHub http://mkoryak.github.io/floatThead/

上找到

添加JavaScript库,然后它是一个单行

$('table').floatThead({
    position: 'auto'
});
相关问题