Skip Navigation

[Resolved] Using JavaScript to expand more search filters isn't working right

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by OliverJ8211 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2146903

I'm trying to have a button to open up advanced search filters on this page: hidden link The website is under construction, but I have made that page live to help with troubleshooting.

I've got the button to open the advanced search filters working, but when ever the user makes a selection it closes the advanced filters. I can see the "Clear Search" button being activated, which I think is the cause.

I can post my html, css and javascript if needed, but you should be able to see it using the link above.

Thank You for your time!

#2147001

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

The problem here is that your filters are set to refresh once a selection is made. What this does is to ensure that none of your filter items will produce a "No Results Found" hence why the advanced filter options are being hidden and you have to re-open it again.

There are 2 ways to solve this. The first way is to disable the refresh of the filter area and allow it to always be displayed regardless of if the selections will produce no results.

The second way is to modify your javascript to use your browsers localstorage to save a value which will allow you to re-open the section once the filter refreshes.

If you're not sure how to do either please let me know and I will provide further clarification on the method you choose.

Thanks,
Shane

#2147029

My issue is resolved now. Thank you!

I was so busy looking at the code that I didn't even think to look in the view settings. Thank You!

#2147031

My issue is resolved now. Thank you!

Was so busy looking at the code and didn't think to check the view settings. Thank You!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.