我用jsFiddle演示了我想在这里做的事:http://jsfiddle.net/clowerweb/SbNdb/
只需点击表格页眉来排序( 您可能需要点击一次以上!)
因此,我这里有一个动态表格,用来增删竞争者,他们可以有不同数目的条目(同样,它也可以保存,并且随机选择一个赢家)。
我想输入参赛者的用户可能也希望能够按字母顺序排序列表,或者按条目数量排序。 我在 SO 上找到一个漂亮的表格排序脚本, 并将其添加到我的 jQuery 函数中 。
问题 is , 它似乎没有读取输入值。 它会将表格的顺序两边颠倒, 并恢复到默认状态, 但实际上不会通过输入值来< strong > sort strong> 它们 。
可能有两个问题: " 强 " / " 强 " 。
- most likely is that it s simply not reading the input values.
- It could also not be able to actually see the dynamically added rows (although it looks like it loops through the table on click, so I don t suspect that as the issue.)
任何帮助都非常感激和感谢!