gpt4 book ai didi

jquery - 粘性表格标题和列 - 两个固定列

转载 作者:行者123 更新时间:2023-11-28 12:32:44 25 4
gpt4 key购买 nike

我正在使用插件 Sticky Table Headers & Columns在一张 table 上。该插件完美运行。我的问题是如何让第二列固定。查了文档,想联系作者,还是联系不上。

我还尝试添加另一个 <th>Sample #2</th> , 但当您滚动时,列顶部会出现一个白色 block ,如您所见 here .

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

已解决: jsfiddle.net/tyanxbbs/8

最佳答案

在 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();

关于jquery - 粘性表格标题和列 - 两个固定列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28329083/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com