2020-05-27 12:24:06 +00:00
|
|
|
function filter_table() {
|
|
|
|
var rex = new RegExp($(this).val(), 'i');
|
|
|
|
$('.searchable tr').hide();
|
|
|
|
$('.searchable tr').filter(function () {
|
|
|
|
return rex.test($(this).text());
|
|
|
|
}).show();
|
2021-06-10 12:17:53 +00:00
|
|
|
Cookies.set(document.title + "_filter", $(this).val(), { expires: 1 });
|
2020-05-27 12:24:06 +00:00
|
|
|
}
|
|
|
|
$(document).ready(function () {
|
2021-06-10 12:17:53 +00:00
|
|
|
filter_cookie = Cookies.get(document.title + "_filter");
|
|
|
|
if (filter_cookie) {
|
|
|
|
$('#filter').val(filter_cookie);
|
2020-07-13 09:33:09 +00:00
|
|
|
$('#filter').each(filter_table);
|
|
|
|
}
|
2020-05-27 12:24:06 +00:00
|
|
|
(function ($) {
|
|
|
|
$('#filter').keyup(filter_table)
|
|
|
|
}(jQuery));
|
|
|
|
});
|