jQuery tablesorter - loss of functionality after AJAX call

后端 未结 8 1006
庸人自扰
庸人自扰 2021-02-14 06:00

I have recently been experimenting with the tablesorter plugin for jQuery. I have successfully got it up and running in once instance, and am very impressed. However, I have tri

8条回答
  •  粉色の甜心
    2021-02-14 06:35

    It may be that as your second table is created with ajax that you need to rebind the events. You may want to use the LiveQuery plugin

    http://docs.jquery.com/Plugins/livequery

    which might "auto-magically" help with your problem.

    edit: sorry, just reread your post and seen that you've tried that already.


    Update. I've rigged up a quick test harness which hopefully will help. There are 3 LIs at the top each one has a different way of updating the table contents. The last one updates the contents and keeps the ordering

        
        
        
    
    
    
            
    • Update Table
    • Update Table with livequery
    • Update Table with livequery & tablesorter

    Last Name First Name Email Due Web Site
    Jones Joe jjones@gmail.com $100.00 http://www.jjones.com
    French Guy gf@yahoo.com $50.00 http://www.french.com

提交回复
热议问题