1

我在表格中使用插件Sticky Table Headers & Columns。该插件完美运行。我的问题是如何让第二列固定。我搜索了文档并尝试联系作者,但仍然失败。

我也尝试添加另一个<th>Sample #2</th>,但是当您滚动时,列顶部会出现一个白色块,如您在此处看到的那样。

我认为我非常接近解决方案。谁能帮我解决这个问题?

已解决: jsfiddle.net/tyanxbbs/8

4

1 回答 1

2

在 jquery.stickyheader.js 中编辑以下行并尝试。

$stickyInsct.html('<thead><tr><th>'+$t.find('thead th:first-child').html()+'</th></tr></thead>');

$stickyInsct.html('<thead><tr><th>'+$t.find('thead th:first-child').html()+'</th><th>'+$t.find('thead th:eq(1)').html()+'</th></tr></thead>');

也更新以下行。我刚刚从0变成了1。

$stickyCol.append($col)
                .find('thead th:gt(1)').remove()
                .end()
                .find('tbody td').remove();
于 2015-02-04T19:08:33.963 回答