jquery 表头排序(jquery.tablesorter.js支持中文)
来源:互联网 发布:sql语句时间比较 编辑:程序博客网 时间:2024/05/16 17:09
Getting started
To use the tablesorter plugin, include the jQuery library and the tablesorter plugin inside the <head>
tag of your HTML document:
<script type="text/javascript" src="/path/to/jquery-latest.js"></script> <script type="text/javascript" src="/path/to/jquery.tablesorter.js"></script>
tablesorter works on standard HTML tables. You must include THEAD and TBODY tags:
<table id="myTable" class="tablesorter"> <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>
Start by telling tablesorter to sort your table when the document is loaded:
$(document).ready(function() { $("#myTable").tablesorter(); } );
Click on the headers and you'll see that your table is now sortable! You can also pass in configuration options when you initialize the table. This tells tablesorter to sort on the first and second column in ascending order.
$(document).ready(function() { $("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} ); } );
按照thead 中的 tr 中的 th 排序
- jquery 表头排序(jquery.tablesorter.js支持中文)
- jquery.tablesorter.js 使用 table js 排序
- Jquery tablesorter,table排序
- Jquery tablesorter,table排序
- jQuery表格排序组件-tablesorter
- jquery插件tablesorter自动排序
- jQuery表格排序组件-tablesorter
- jQuery表格排序组件-tablesorter
- jquery插件tablesorter自动排序
- jquery tablesorter插件 表格排序
- jquery.tablesorter.js实列
- javascript-jquery-tablesorter的问题:如果表头是多行的,点击排序好像就不正确了
- jquery tablesorter
- Jquery tablesorter addParser 支持多浏览器,多列同时排序,自定义排序
- jQuery html表格排序插件:tablesorter
- jquery+gridview+tablesorter 实现客户端排序
- jQuery入门教程-使用tablesorter插件(表格排序)
- jQuery 表格排序插件 Tablesorter 使用
- 深入浅出.NET代码生成系列(1):概述
- osgFX - 开发者简明手册
- 线上hadoop集群重启jobtracker
- TCPMP源码编译与在WINCE上的应用
- Json - 使用json-lib完成javabean对象转换成json字符串
- jquery 表头排序(jquery.tablesorter.js支持中文)
- 使用JSON的方法
- nasm与c混合编程
- linux模块基础知识
- 【PHP】简单过滤xss类
- 获取表中所有字段信息
- Position属性四个值:static、fixed、absolute和relative的区别和用法
- __cdecl __fastcall与 __stdcall区别
- Linux内核发送构造数据包的方式