插件jquery.tablesorter.min.js 提供了排序,是用方法是引入js
<script type='text/javascript' src='../../js/jquery-1.4.2.js'></script> <script type='text/javascript' src='../../js/jquery.tablesorter.min.js'></script>
在需要的地方加上
$(document).ready(function() { $("#roomRatesTable").tablesorter(); });
添加例外:
//第5列
$("# roomRatesTable").tablesorter ({headers:{6:{sorter:false}}});