Jquery tablesorter不在表上显示箭头
这个问题已经被问了好几次了,但没有一个答案对我有用 我最近将jQuery1.x更新为3.x,这时箭头消失了 代码如下:Jquery tablesorter不在表上显示箭头,jquery,tablesorter,Jquery,Tablesorter,这个问题已经被问了好几次了,但没有一个答案对我有用 我最近将jQuery1.x更新为3.x,这时箭头消失了 代码如下: <html> <head> <title>Inspections</title> <link rel="Stylesheet" href="css/theme.blue.css" type="text/css" /> <script type="text/javascript" s
<html>
<head>
<title>Inspections</title>
<link rel="Stylesheet" href="css/theme.blue.css" type="text/css" />
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script> <!-- 2.17.8 -->
</head>
<body>
<div id='inspectionoutstandingdiv'>
<h1>Inspections
</h1>
<table id='activeinspections' class='tablesorter'>
<thead>
<tr>
<th>Field 1 </th>
<th>Field 2 </th>
</tr>
</thead>
<tbody>
<tr>
<td>Some Data 1 </td>
<td>Some Data 2 </td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript">
$('#activeinspections').tablesorter({theme:'blue'});
</script>
</body>
</html>
检查
检查
字段1
字段2
一些数据1
一些数据2
$('#activeinspections').tablesorter({theme:'blue'});
其中一个建议是将.gif文件放置在正确的停止位置,或者修改css以指向.gif文件,但是当我打开theme.blue.css时,我注意到.gif文件作为编码文本嵌入到.css中
我使用浏览器调试器运行,查看它是否在抱怨无法加载的文件
这段代码在旧版本的jq和tablesorter下工作,该版本使用单个.gif文件作为箭头
我做错了什么,箭头没有出现
根据莫蒂的建议,我在tablesorter调用中添加了主题:“blue”
,但这没有帮助
然后,我将
class='tablesorter'
更改为class='tablesorter-blue'
,效果很好。我不认为这是一个理想的解决方案,所以我仍然想要一个答案。问题是我使用了一个名为Mottie-tablesorter-08bf513.zip的.zip文件,而我本应该直接从github下载Mottie的代码
正确的代码有如下注释:
/*! TableSorter (FORK) v2.xx.xx *//*
如果你使用我的,你需要添加一个。。。将其设置为
theme:'blue'
。我添加了{theme:'blue'},但它仍然没有添加箭头。排序工作正常(和以前一样)。你确定主题css文件正在加载吗?我在浏览器中检查了javascript调试器,它没有抱怨文件没有加载。我还应该如何检查?您应该在答案中添加解决方案,而不是在问题中,请参见