mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Storage utility will now accept a table element or jQuery table object
This commit is contained in:
parent
047e6fcc18
commit
aabc4621ac
@ -69,13 +69,15 @@ ts.themes = {
|
||||
alert(val); // "data1" if saved, or "" if not
|
||||
*/
|
||||
ts.storage = function(table, key, value, options) {
|
||||
table = $(table)[0];
|
||||
var cookieIndex, cookies, date,
|
||||
hasLocalStorage = false,
|
||||
values = {},
|
||||
c = table.config,
|
||||
id = options && options.id || $(table).attr(options && options.group ||
|
||||
'data-table-group') || table.id || $('.tablesorter').index( $(table) ),
|
||||
url = options && options.url || $(table).attr(options && options.page ||
|
||||
$table = $(table),
|
||||
id = options && options.id || $table.attr(options && options.group ||
|
||||
'data-table-group') || table.id || $('.tablesorter').index( $table ),
|
||||
url = options && options.url || $table.attr(options && options.page ||
|
||||
'data-table-page') || c && c.fixedUrl || window.location.pathname;
|
||||
// https://gist.github.com/paulirish/5558557
|
||||
if ("localStorage" in window) {
|
||||
|
Loading…
Reference in New Issue
Block a user