Skip Navigation

[Resolved] Accordion not working after filtering results

This support ticket is created 5 years, 4 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Craig 5 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1354697

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

#1354949

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

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
       
});

Please check the following Doc:
=> https://toolset.com/documentation/programmer-reference/adding-custom-javascript-code-to-views-that-use-ajax/

#1355027

Thank you Minesh,

I will try and find the required code to call the accordion again. Failing that, I will get in touch with the plugin dev and find out from them.

I will let you know how I get on.

Kind regards,
Craig

#1355451

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - sure.

#1358203

Hi Minesh,

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.

Kind regards,
Craig

#1358205

My issue is resolved now. Thank you!