在动态修改的表上使用jQuery tableSorter

编程入门 行业动态 更新时间:2024-10-27 03:43:00
本文介绍了在动态修改的表上使用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

本文发布于:2023-10-14 12:15:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1491040.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表上   动态   tableSorter   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!