Thank you very much, worked as intended :)
On 2 ene, 15:18, aquaone <aqua...@gmail.com> wrote: > You need to trigger the update event for the table for tablesorter to > rebuild the cache. At the bottom of your .delete_button click function, add > $("#shop_list").update(); and it should fix your problems. For more > information, please seehttp://tablesorter.com/docs/example-ajax.html. > > aquaone > > On Fri, Jan 1, 2010 at 18:18, Jahvi <javie...@gmail.com> wrote: > > 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!