2022-11-04 17:53:42 -04:00
|
|
|
$(document).ready(function() {
|
2024-05-25 11:36:12 -04:00
|
|
|
// 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', () => {
|
2024-05-25 11:36:12 -04:00
|
|
|
$.cookie('filter_limit', $('#filter-limit').val());
|
|
|
|
console.log($('#filter-limit').val());
|
2024-05-24 12:35:01 -04:00
|
|
|
$('#filter-form').submit();
|
|
|
|
});
|
2022-11-04 17:53:42 -04:00
|
|
|
});
|