psy*_*ott 12 jquery tablesorter unbind
我正在使用jQuery tablesorter(http://tablesorter.com).
在应用于表格之后$('#myTable').tablesorter(),如何从表格中再次删除它?
Mot*_*tie 27
没有内置函数来执行此操作,但您可以删除类名称和事件绑定以停止其运行...尝试这样的事情:
$('table')
.unbind('appendCache applyWidgetId applyWidgets sorton update updateCell')
.removeClass('tablesorter')
.find('thead th')
.unbind('click mousedown')
.removeClass('header headerSortDown headerSortUp');
Run Code Online (Sandbox Code Playgroud)
如果您正在运行寻呼机插件,则上述操作无效.
小智 17
tablesorter2.0
$("#table").trigger("destroy");
Run Code Online (Sandbox Code Playgroud)
或者如果你只是需要在追加新的thead之后更新所有内容:
$("#table").trigger("updateAll");
Run Code Online (Sandbox Code Playgroud)
- > http://mottie.github.io/tablesorter/docs/index.html
| 归档时间: |
|
| 查看次数: |
15232 次 |
| 最近记录: |