I am using the jquery tablesorter plugin ( http://tablesorter.com/docs/ ) to sort my tables. This works for already created lines. But when I add a line dynamically using the jQuery clone () method, sorting does not work.
What should I do to sort the rows even if I add the row dynamically?
$('.tablesorter').trigger('update'); after adding a line.
$('.tablesorter').trigger('update');
Tablesorter only scans the table once, and then sorts the internally stored numeric or text values. This is pretty smart, actually, as it makes the sorting process super fast.
ajax, , "" .
: http://tablesorter.com/docs/example-ajax.html
:
// let the plugin know that we made a update $("table").trigger("update");
Source: https://habr.com/ru/post/1764997/More articles:Requesting specific hardware information on Windows with C ++ - gpuSort ArrayList by number - javaDetermine the differences between two computers running Windows XP? - windows-xpHow to split APC cache between apache and php_cli? - phpAttempting to set graph in R - rProblems with Microsoft Excel COM Automation - c #What does it mean to have uselongdouble undefined, but d_longdbl is defined in the Perl build configuration? - perlASP.NET MVC Razor Platform - asp.net-mvc-3Bestive-C Best practice for writing a simple method? - functionTelerik Extensions for ASP.NET MVC - Effective Implications - performanceAll Articles