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?