gpt4 book ai didi

footable,如何在页面加载后显示 "sorted"图标?

转载 作者:行者123 更新时间:2023-12-02 04:42:33 24 4
gpt4 key购买 nike

我使用优秀的“footable”插件。我可以通过单击标题对表格进行排序,但如何告诉“footable”:在页面加载后立即使用此列对该表格进行排序?

我尝试使用此关键字:data-sort-initial,但没有成功:

 <thead>
<tr>
<th data-type="html" data-sort-use="text" data-sort-initial="ascending">Code</th>
<th>Libellé</th>

</tr>
</thead>

我的目标是在加载后立即获得此表:

enter image description here

标题中显示“排序图标”。怎么做 ?

我的js很简单:

$(function () {
$('.footable').footable();
});

谢谢你的想法。谢谢

多米尼克

最佳答案

找到答案了。

<th data-type="html" data-sort-use="text" data-sorted="true" data-direction="ASC">Code</th>

关于footable,如何在页面加载后显示 "sorted"图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41519969/

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