【发布时间】:2016-01-27 06:19:09
【问题描述】:
我在引导程序中使用数据表,但图表中的默认图标不显示, datatables official website 上有例子
我要显示的是默认图标如下:
我使用PHP插入datables javascript和css的链接,我自定义的css或javascript函数是否存在错误导致这个问题?
$('#table-sort').DataTable({
paging: false,
searching: false,
info: false,
"order":[[2,"desc"]],
"columnDefs":[{
"orderable":false,
"targets":[0,1]
}]
});
<table class="table table-hover table-striped table-bordered compact table-sorting dataTable" id="table-sort" cellspacing="0" role="grid">
<thead>
<tr>
<th>username</th>
<th>description</th>
<th id="closing_date" style="cursor: pointer">deadline</th>
<th id="update_date" style="cursor: pointer">update</th>
<th>action</th>
</tr>
</thead>
</table>
感谢大家耐心阅读我的问题,如果有人提供任何解决方案,我将不胜感激。
【问题讨论】:
-
请检查您的控制台是否有任何错误显示?
-
对不起,我检查了控制台,但没有显示错误。
-
为什么有些选项只有双引号?,检查一下
-
我无法检查您的编码,请将您的编码放在 jsfiddle 或其他中
-
谢谢你,我才发现是我添加css的方法出错了!我应该通过 标签而不是使用 PHP 来链接样式表!这使得浏览器在引导样式表之前加载 jquery.css !无论如何,谢谢你抽出时间来帮助我!
标签: javascript jquery css twitter-bootstrap datatables