overseer/assets/js/nechryael.js

19 lines
627 B
JavaScript
Raw Normal View History

2022-11-04 17:53:42 -04:00
$(document).ready(function() {
// check state of limit filter
var cookie_limit = $.cookie('filter_limit');
// if limit is different than what's selected
var active_limit = $('#filter-limit').val();
if ((cookie_limit) && (cookie_limit != active_limit)) {
console.log('cookie is different from whats active.');
$('#filter-limit').val(cookie_limit).change();
} else {
console.log('cookie is not set or is the same.');
}
2024-05-24 12:47:57 -04:00
$('#filter-limit').on('change', () => {
$.cookie('filter_limit', $('#filter-limit').val());
console.log($('#filter-limit').val());
$('#filter-form').submit();
});
2022-11-04 17:53:42 -04:00
});