Tablesorter 示例不工作
这应该有效:
<head>
<title>Damn</title>
<script src="jquery-latest.js" type="text/javascript"/>
<script src="jquery.tablesorter.min.js" type="text/javascript"/>
<script type="text/javascript">
$(document).ready(function() {
$("#tablesorter-demo").tablesorter();
});
</script>
</head>
<body>
<table id="tablesorter-demo" class="tablesorter" border="2" cellpadding="0" cellspacing="1">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Age</th>
<th>Total</th>
<th>Discount</th>
<th>Difference</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>Peter</td>
<td>Parker</td>
<td>28</td>
<td>$9.99</td>
<td>20.9%</td>
<td>+12.1</td>
<td>Jul 6, 2006 8:14 AM</td>
</tr>
<tr>
<td>John</td>
<td>Hood</td>
<td>33</td>
<td>$19.99</td>
<td>25%</td>
<td>+12</td>
<td>Dec 10, 2002 5:14 AM</td>
</tr>
<tr>
<td>Clark</td>
<td>Kent</td>
<td>18</td>
<td>$15.89</td>
<td>44%</td>
<td>-26</td>
<td>Jan 12, 2003 11:14 AM</td>
</tr>
</tbody>
</table>
</body>
但事实并非如此。
我做错了什么?
注意:我不太明白,但这似乎遵循Tablesorter主页上的示例,没有错误。
我知道我会感到非常羞愧。
This should work:
<head>
<title>Damn</title>
<script src="jquery-latest.js" type="text/javascript"/>
<script src="jquery.tablesorter.min.js" type="text/javascript"/>
<script type="text/javascript">
$(document).ready(function() {
$("#tablesorter-demo").tablesorter();
});
</script>
</head>
<body>
<table id="tablesorter-demo" class="tablesorter" border="2" cellpadding="0" cellspacing="1">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Age</th>
<th>Total</th>
<th>Discount</th>
<th>Difference</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>Peter</td>
<td>Parker</td>
<td>28</td>
<td>$9.99</td>
<td>20.9%</td>
<td>+12.1</td>
<td>Jul 6, 2006 8:14 AM</td>
</tr>
<tr>
<td>John</td>
<td>Hood</td>
<td>33</td>
<td>$19.99</td>
<td>25%</td>
<td>+12</td>
<td>Dec 10, 2002 5:14 AM</td>
</tr>
<tr>
<td>Clark</td>
<td>Kent</td>
<td>18</td>
<td>$15.89</td>
<td>44%</td>
<td>-26</td>
<td>Jan 12, 2003 11:14 AM</td>
</tr>
</tbody>
</table>
</body>
But it doesn't.
What am I doing wrong?
NOTE: I don't understand much, but this seems to follow the example on the home page of Tablesorter without errors.
And I know I'll be completely ashamed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正确关闭脚本标签,
您必须使用
关闭它
close your script tag properly
you have to close it with
</script>
我刚刚运行了这个,它工作得很好,只是我必须将完整路径放入表排序脚本文件,因为我没有它们。
I just ran this and it worked fine except that I had to put the full path to the table sortet script files because I don't have them.
这两个实际上指向现有文件吗?
do these 2 actually point to existing files?