Skip to content
Snippets Groups Projects
Commit f4b12ea1 authored by Chris Lawton's avatar Chris Lawton
Browse files

adding window resize method to reset the mobile filters if they're left open...

adding window resize method to reset the mobile filters if they're left open past the tablet breakpoint
parent 25153fd4
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,14 @@ $(function () {
$('.select2-selection.is-active').removeClass('is-active');
});
});
// reset mobile filters if they're open past the tablet breakpoint
$(window).resize(function resize(){
if ($(window).width() > 768) {
$('.js-filter-wrapper').removeClass('is-open');
$('.js-filter-list').removeClass('form__filters--mobile');
}
}).trigger('resize');
});
// wait for DOM content to load before checking for select2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment