如何在jQuery.tablesorter中禁用列的排序? [英] How to disable sorting on column in jQuery.tablesorter?

查看:218
本文介绍了如何在jQuery.tablesorter中禁用列的排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一种方法来禁用列上的排序。我使用jQuery插件 tablesorter 。默认情况下,如果单击标题单元格,它会对列数据进行排序,但如果我不需要在四列表中的一列或两列上使用排序,我需要做什么。

I try to find a way how to disable sorting on column. I use jQuery plugin tablesorter. And by default if you click on header cell it sort column data, but what I need to do if I don't need to use sorting on one or two column in four columns table.

提前致谢。

推荐答案

您必须传递适当的参数在初始化时,例如:

You must pass the appropriate parameters at initialization, for example:

{ ...
   headers: { 0: { sorter: false} }
}

有关详细信息,请查看手册:

For more information, check the manual at:

http://tablesorter.com/docs/

这篇关于如何在jQuery.tablesorter中禁用列的排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆