Tablesorter example not working
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.close your script tag properly
<script src="jquery-latest.js" type="text/javascript"></script>
<script src="jquery.tablesorter.min.js" type="text/javascript"></script>
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.
<script src="http://tablesorter.com/jquery-latest.js" type="text/javascript"></script>
<script src="http://tablesorter.com/jquery.tablesorter.min.js" type="text/javascript"/>
do these 2 actually point to existing files?
<script src="jquery-latest.js" type="text/javascript"/>
<script src="jquery.tablesorter.min.js" type="text/javascript"/>
精彩评论