jQuery 表格排序插件 Tablesorter 使用
2013-10-10 17:49
791 查看
jQuery 表格排序插件 Tablesorter 使用方式如下:
1.引入头文件(注意一定要把jQuery放在前面):
2.在需要使用排序的<Table>上无需做任何设定,很方便:
在<thead>上就会有两个小三角符号,点击可以用于排序。
![](http://img.blog.csdn.net/20131010175221703?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGVpeGlhb2h1YTEwMjA=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
Tablesorter下载地址:http://download.csdn.net/detail/leixiaohua1020/6377187
1.引入头文件(注意一定要把jQuery放在前面):
<script src="lib/jquery-1.8.3.min.js"></script> <!--tablesorter--> <link href="css/css_tablesorter_green/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="lib/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#alltable").tablesorter(); }); </script>
2.在需要使用排序的<Table>上无需做任何设定,很方便:
<table id="alltable" class="tablesorter" width="584"> <thead> <tr> <th>Last Name</th> <th>First Name</th> <th>Email</th> <th>Due</th> <th>Web Site</th> </tr> </thead> <tbody> <tr> <td>Smith</td> <td>John</td> <td>jsmith@gmail.com</td> <td>$50.00</td> <td>http://www.jsmith.com</td> </tr> <tr> <td>Bach</td> <td>Frank</td> <td>fbach@yahoo.com</td> <td>$50.00</td> <td>http://www.frank.com</td> </tr> <tr> <td>Doe</td> <td>Jason</td> <td>jdoe@hotmail.com</td> <td>$100.00</td> <td>http://www.jdoe.com</td> </tr> <tr> <td>Conway</td> <td>Tim</td> <td>tconway@earthlink.net</td> <td>$50.00</td> <td>http://www.timconway.com</td> </tr> </tbody> </table>
在<thead>上就会有两个小三角符号,点击可以用于排序。
Tablesorter下载地址:http://download.csdn.net/detail/leixiaohua1020/6377187
相关文章推荐
- jQuery 表格排序插件 Tablesorter 使用
- jQuery 表格排序插件 Tablesorter 使用
- jQuery 表格排序插件 Tablesorter 使用
- jQuery入门教程-使用tablesorter插件(表格排序)
- jQuery 表格排序插件 Tablesorter 使用
- jquery.tablesorter表格排序插件的使用 收藏
- 使用jquery的tablesorter插件进行表格排序
- 表格排序——jQuery插件tablesorter的使用
- 使用jquery的tablesorter插件进行表格排序
- 使用jquery的tablesorter插件进行表格排序
- jquery tablesorter表格排序插件的使用
- jQuery 表格排序插件 Tablesorter 使用
- jQuery html表格排序插件tablesorter使用方法详解
- jQuery表格排序组件-tablesorter使用示例
- jQuery插件tablesorter 表格排序 自定义排序addParser()
- jQuery排序插件tableSorter使用方法
- jquery tablesorter插件 表格排序
- jQuery表格排序组件-tablesorter使用示例
- jQuery html表格排序插件:tablesorter
- 新学的插件jquery.tablesorter很好用,说说遇到的表格动态添加的数据不能排序的问题