Hi Finsweet Community,
I’m experiencing an issue with the filter attribute on mobile. The filters are on the boats page (/boats). The functionality works perfectly on desktop, but on mobile, I’ve set up a sidebar where all the filters are located. The sidebar is not set to display: none
; instead, it’s display: block
but transformed off-screen (to the left) until a user clicks a button to slide it out.
Here’s what I’m trying to achieve:
- Users open the sidebar.
- They select their desired filters.
- They click a button that says “Click to Apply Filters” to apply the changes.
The issue is that this doesn’t work consistently:
- The first time I open the filters on mobile, it works without even pressing the “Click to Apply Filters” button. As soon as I select my filters, the sidebar closes, and all the changes are applied automatically.
- The next time I open the sidebar, I can select the filters, but they don’t apply automatically anymore. Then, when I click the “Click to Apply Filters” button, nothing happens.
I suspect the issue might be related to how the filter script interacts with the sidebar’s transform or visibility changes. But I’ve tried many different ways of hiding the sidebar including z-index, scaleX, width, and translateX.
Read-Only Link:
Here’s my Webflow read-only link for reference:
https://preview.webflow.com/preview/tom-n-jerrys?utm_medium=preview_link&utm_source=designer&utm_content=tom-n-jerrys&preview=b677d3823cf89c90030ae68183846a5f&pageId=672fde9013b064d3de3abfea&locale=en&workflow=preview
Has anyone experienced something similar or have ideas on how to fix this? Any tips on reinitializing the filters or ensuring the “Click to Apply Filters” button works as expected?
Thanks in advance for your help!