在动态修改的表上使用jQuery tableSorter [英] Using jQuery tableSorter on dynamically modified table

查看:76
本文介绍了在动态修改的表上使用jQuery tableSorter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在页面上使用jQuery tableSorter插件.

I am using the jQuery tableSorter plugin on a page.

不幸的是,正在排序的表是动态修改的,添加元素后进行排序时,该元素消失了,将表恢复到创建tableSorter时的状态.

Unfortunatley, the table that is being sorted is dynamically modified, and when I sort after adding an element, the element disappears, restoring the table to the state that it was in when the tableSorter was created.

有什么办法可以迫使tableSorter重新扫描页面,以便对这些新元素进行正确排序?

Is there any way that i can force tableSorter to rescan the page so that these new elements are sorted properly?

推荐答案

我相信您可以使用以下方法触发更新:

I believe you can trigger an update using something like:

$(table).trigger("update")

这篇关于在动态修改的表上使用jQuery tableSorter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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