Forums › Forums › Search & Filter Pro › Lightbox not working after ajax loads
- This topic has 5 replies, 2 voices, and was last updated 4 years, 2 months ago by Anonymous.
-
Anonymous(Private) October 7, 2020 at 9:55 am #262159
Hi !
I have an issue with my lightbox scrit not loading after I have changed the category.
Here is the page :
https://www.pingflow.com/wallboards/If you click on the pictures, a lightbox opens. Nom if you click on one of the filters on the left and then click on a pictures, the lightbox no longer works.
The lightbox I use is http://chocolat.insipi.de/ and here is the code : chcolate light
$(‘.thumbnail-gallery’).Chocolat();
Thank you !
CarolineTrevor(Private) October 7, 2020 at 4:54 pm #262271If you are using Ajax in the form to refresh the results and this happens, and if you disable Ajax in the form and it does not happen, then what you need is to reapply the lightbox script to the posts after the Ajax has finished. You would need to know the actual script being used by your lightbox plugin, but the JavaScript would look like this:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ // call your lightbox script or function here }); }(jQuery));</script>
-
AuthorPosts