JQuery Tablesorter memorizeSortOrder widget
Posted
by echedey lorenzo
on Stack Overflow
See other posts from Stack Overflow
or by echedey lorenzo
Published on 2010-03-28T01:19:47Z
Indexed on
2010/03/28
1:23 UTC
Read the original article
Hit count: 694
Hi,
I've found this code in the internet:
$.tablesorter.addWidget({
id: "memorizeSortOrder",
format: function(table) {
if (!table.config.widgetMemorizeSortOrder.isBinded) { // only bind if not already binded
table.config.widgetMemorizeSortOrder.isBinded = true;
$("thead th:visible",table).click(function() {
var i = $("thead th:visible",table).index(this);
$.get(table.config.widgetMemorizeSortOrder.url+i+'|'+table.config.headerList[i].order);
});
} // fi
}
});
Found in: http://www.adspeed.org/2008/10/jquery-extend-tablesorter-plugin.html
I would like to memorize the sorting of my ajax tables so on each update (table changes completely so there is no append) it keeps sorted the as it was.
Question is.. how can use this?
$("#tablediv").load(
"table.php",
null,
function (responseText, textStatus, req) {
$("#table").trigger("update");
}
);
What changes do I need?
© Stack Overflow or respective owner