Forums Forums Search & Filter Pro Masonry Implementation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #9018

    I’ve got jQuery Masonry working when the page first loads, but it does not get applied after each ajax request. Is there an event handler that I can trigger this with? Thanks!

    Anonymous
    #9019

    Got it. In case this is helpful to others, you can trigger scripting functions after the ajax filter by wrapping them in this function:

    jQuery(window).ajaxComplete(function($){ $('.target').action(); });

    Ross Moderator
    #9026

    Hey Robbin

    Thanks for this – you got further than most – this used to be a suggestion I provided but to make life easier I created two custom events which you can hook in to like:

    $(".searchandfilter").on("sf:ajaxstart",function(){
    console.log("ajax start");
    });
    
    $(".searchandfilter").on("sf:ajaxfinish",function(){
    console.log("ajax complete");
    //so load your lightbox or JS scripts here again
    });

    Thanks 🙂

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