do i best place search filters on mobile view? We have around 20 filters, and we are looking for a way improve user experience on mobile.
hidden link
To see what I mean
We thought best would be to have a toggle on mobile, sliding in filters from the side, or via pop-up
I also thought that an accordion may work, however the button "clear all filters" doesnt function as expected when using the accordion.
Hello there!
Our 2nd Tier has suggested to use the following code, I hope it will work for all the devices and screens:
document.addEventListener("DOMContentLoaded", function(){
jQuery(document).on('js_event_wpv_parametric_search_form_updated js_event_wpv_parametric_search_results_updated', function (event, data) {
jQuery('.ugb-accordion__heading').on('click', function (event, data) {
var aria = jQuery(this).closest('.wp-block-ugb-accordion').attr('aria-expanded');
jQuery(this).closest('.wp-block-ugb-accordion').toggleClass('ugb-accordion--open');
jQuery(this).closest('.wp-block-ugb-accordion').attr('aria-expanded', aria ? 'false' : 'true');
});
});
});
Please try it in the view and let us know if it helps.