diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 5a0a75e8..415a080a 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -70,7 +70,14 @@ ts.storage = function(table, key, val){ var d, k, ls = false, v = {}, id = table.id || $('.tablesorter').index( $(table) ), url = window.location.pathname; - try { ls = !!(localStorage.getItem); } catch(e) {} + // https://gist.github.com/paulirish/5558557 + if ("localStorage" in window) { + try { + window.localStorage.setItem('_tmptest', 'temp'); + ls = true; + window.localStorage.removeItem('_tmptest'); + } catch(e) {} + } // *** get val *** if ($.parseJSON){ if (ls){