开发者

Does tablesorter have a onsort event?

开发者 https://www.devze.com 2023-03-28 03:31 出处:网络
I\'ve just downloaded tablesorter and got it up and running. I nee开发者_如何学编程d some code to run each time the user sorts the table, and I cant find anything in the documentation :-(

I've just downloaded tablesorter and got it up and running.

I nee开发者_如何学编程d some code to run each time the user sorts the table, and I cant find anything in the documentation :-(

So if anyone know that would be great, thanks!

Is there a event that is triggered each time i sort a column? I need to be the event AFTER the sorting is done


You can bind 'sortEnd' to the tablesorter, see the documentation:

http://tablesorter.com/docs/example-triggers.html

from the tablesorter documentation:

$(document).ready(function() { 
    // call the tablesorter plugin, the magic happens in the markup 
    $("table").tablesorter(); 

    //assign the sortStart event 
    $("table").bind("sortStart",function() { 
        //do your magic here
    }).bind("sortEnd",function() { 
        //when done finishing do other magic things
    }); 
}); 
0

精彩评论

暂无评论...
验证码 换一张
取 消