[Resolved] Video doesn’t play after AJAX results update
This thread is resolved. Here is a description of the problem and solution.
Problem:
Video do not play with AJAX view pagination
Solution:
Views offers ajax callback events. When you visit view's Filter section's JS box - you will see a button "Frontend Events" which will allow you to add AJAX calllback events for AJAX view.
Link to a page where the issue can be seen: hidden link
I expected to see: The filter works, but after the filter the vidoes don't play
I kind of know what the problem is, just not how to fix it. When the AJAX results are updated the page reloads but the click javascript doesn't get reloaded on the video overlay.
So I think it's to do with getting this code into the page after AJAX refresh:
function() {
var $this = $(this);
et_pb_play_overlayed_video($this);
return false;
}
Hello. Thank you for contacting the Toolset support.
Well - Views offers ajax callback events that may help you here.
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
});
Well - you should try to replace your custom JS code that should run after the ajax request with "YOUR CUSTOM CODE GOES HERE".
If you can share more information - I will try to help you out.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.