Forums Forums Search & Filter Pro Lightbox not working after ajax loads

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #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 !
    Caroline

    Anonymous
    #262160

    Sorry for the “chcolate light”, it is not part of the code whoch is only :

    $(‘.thumbnail-gallery’).Chocolat();

    Trevor
    #262271

    If 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>
    Anonymous
    #262565

    Perfect, thank you !

    Trevor
    #262569

    Is it OK to close this thread for now?

    Anonymous
    #262583

    Yes !

Viewing 6 posts - 1 through 6 (of 6 total)