jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jQuery dataTable不显示排序图标大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图使用一个jQuery dataTable插件.问题是不显示排序图标(指向哪个方向数据实际排序的箭头).

我的代码如下所示:

$('#example').dataTable(
{
    "bPaginate": false,"bFilter": false,"oLanguage": { "sInfo": ""}        
}
);

和Html:

<table class="surfClass" cellspacing="1" id="example">

<thead>
<tr>
    <th width="120px">Name</th>
    <th width="120px">The hourly rate (points)</th>
    <th>Levels of referrals</th>
    <th>bonuses</th>
    <th width="70px">Payout minimum</th>
</tr>
</thead>

解决方法

我有这个问题,我发现因为我已经将CDN脚本复制到我的本地机器,它没有正确地引用图像,正如@ Matt2012指出的.所以我的解决方案是更新CSS文件,以寻找那些我想要放置它们的图像,在我也保存它们之后.

看这部分:

table.dataTable thead .sorTing { BACkground: url('/Content/images/sorT_Both.png') no-repeat center right; }
table.dataTable thead .sorTing_asc { BACkground: url('/Content/images/sort_asc.png') no-repeat center right; }
table.dataTable thead .sorTing_desc { BACkground: url('/Content/images/sort_desc.png') no-repeat center right; }

table.dataTable thead .sorTing_asc_disabled { BACkground: url('/Content/images/sort_asc_disabled.png') no-repeat center right; }
table.dataTable thead .sorTing_desc_disabled { BACkground: url('/Content/images/sort_desc_disabled.png') no-repeat center right; }

大佬总结

以上是大佬教程为你收集整理的jQuery dataTable不显示排序图标全部内容,希望文章能够帮你解决jQuery dataTable不显示排序图标所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。