[Résolu] Accordion not working after filtering results
This support ticket is created Il y a 4 années et 6 mois. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I have created a View with an AJAX filter (results update when visitors change any filter values) which displays a list of results in an accordion which works perfectly until I use the filter. When the filter loads the results, the accordion no longer works.
Link to a page where the issue can be seen: hidden link
Hello. Thank you for contacting the Toolset support.
When you visit view's Filter section's JS box - you will see a button "Frontend Events". When you click it it will allow you to choose ajax callback events for parametric search.
For example:
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.layout (object) The jQuery object for the View layout wrapper
*/
//// YOUR CUSTOM CODE GOES HERE and call accordion again
});
I received some help from the plugin developer, but to no avail. I have since decided to use a submit button and refresh the page for the results, that way the accordion works perfectly every time.
Thanks again for your help, I will bear it in mind for future projects.