Hi, Im currently using the tablesorter plugin to style a table im
using, the code is the following:

$(document).ready(function(){
       $("#shop_list")
        .tablesorter({widthFixed: true, widgets: ['zebra'],
                headers: {
                        2: {
                                sorter: false
                        },
                        3: {
                                sorter: false
                        }
                }
        })
        .tablesorterPager({container: $("#pager")});
});

As you can see it applies the plugin to the table id 'shop_list' and
works fine on page load, I also have buttons on each record of the
table that deletes them:

$('.delete_button').live('click', function() {
        var id = $(this).attr("id").split("_");
        var id_store= id[1];
        jConfirm('Delete store?','Confirm', function(r) {
                if (r==true){
                        $('#async_div').load('store.async.php?
async=4&id_store='+id_store);   //Delete store
                        $('#table_div').load('store.async.php?
async=1');                                  //Update Table
                }
        });
});

store.async.php contains all the php functions for that page and its
working fine the problem is that when the table updates with the
deleted record off the tableSorter plugin doesn't reapply. I've tried
playing with the live function but I havent been able to make it work.
Is there any way to do it? Or a better way to update the table without
reloading it?

Thanks in advance!

Reply via email to