Gregory Ballantine
94c1c26e94
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
19 lines
627 B
JavaScript
19 lines
627 B
JavaScript
$(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.');
|
|
}
|
|
|
|
$('#filter-limit').on('change', () => {
|
|
$.cookie('filter_limit', $('#filter-limit').val());
|
|
console.log($('#filter-limit').val());
|
|
$('#filter-form').submit();
|
|
});
|
|
});
|