Lightbox not working after ajax loads

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)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.