Problem:
I have used the Collapse-o-Matic plugin to allow Sectors (filters) to be opened and closed, however, I would like the filter to stay open is one of the filters is selected. I have added the collapse_init js to make them close on js_event_wpv_parametric_search_results_updated
Is there some other js I can use to close only the Sectors (filters) that are unchecked and keep open those that are checked?
So, for example, if someone opens the Biology sector and selects Bio-imaging, once the results are rendered, I need the Biology sector to stay open while the others close.
Solution:
There isn't such a built-in feature within Views plugin, it needs custom JS codes, I suggest you try these: when user submit the form, use js_event_wpv_parametric_search_results_updated to trigger an custom JS function, in this JS function, check if there is any option is selected, then opens the related sector.
Relevant Documentation:
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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 3 replies, has 2 voices.
Last updated by Luo Yang 6 years, 3 months ago.
Assisted by: Luo Yang.