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.