I am trying to: create a hover effect that hides an element on hover for 5 seconds and then reveals a gallery. which is positioned under the element.
I have used jQuery and it seems to work however when I select a filter option the archive filters as expected but my jquery no longer works even though all the classes seem in place.
Link to a page where the issue can be seen:
When the URL is normal they jquery works hidden link
after the filter selection the jquery does not work hidden link
Hello. Thank you for contacting the Toolset support.
Yes - I can see the issue with the link you shared but I would like to know hat jQuery code you've added which is not working after you select the filter?
Actually, view offers AJAX callback which you should use in such cases to bind your jQuery. 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.
Refer this image:
=> hidden link
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
});
Ok, Thank you I had added my code to the head of my theme, as usually I like to keep everything together. I have now added it to the layout section as it is for the layout and not the filter and it is working...
Thank you for the pointers