Forums Forums Search & Filter Pro No Results Found

Viewing 8 posts - 11 through 18 (of 18 total)
  • Trevor
    #57838

    Either would do.

    Anonymous
    #57840

    I have had a few days off and am kind of out of it. I have tried it in a seperate .js and on a script loaded at the page level. Any help would be greatly appreciated.

    Anonymous
    #57842

    Dont know if it would help, but I am using easy fancybox plugin.

    Trevor
    #57856

    What code did you use?

    Anonymous
    #57862
    <script type="text/javascript">
    //detects the start of an ajax request being made
    $(document).on("sf:ajaxstart", ".searchandfilter", function(){
      console.log("ajax start");
    });
    
    //detects when the ajax request has finished and the content has been updated
    // - add scripts that apply to your results here
    $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    	console.log("ajax complete");
    	$(document).on('sf:ajaxfinish', easy_fancybox_handler );
    	//so load your lightbox or JS scripts here again
    });
    
    //an event fired when S&F is initialised and S&F scripts have been loaded
    $(document).on("sf:init", ".searchandfilter", function(){
    	console.log("S&F JS initialised");
    });
    </script> 

    I apologize if I am making a stupid mistake, I need more coffee.

    Anonymous
    #57864

    Or should I just do

    <script type="text/javascript">
    jQuery( document ).on( 'sf:ajaxfinish', easy_fancybox_handler );
    </script>
    Anonymous
    #57866

    Was the second option. Thanks…idk why I am getting a slow start. Need to listen to some Dragonforce and Sabaton to get the blood flowing.

    Trevor
    #57868

    LOL.

    FWIW, our developer just told me that sometimes the events need to be wrapped in a function, as per the example at the end of this GIST:

    https://gist.github.com/rmorse/b157004c68870dbd9fb9

Viewing 8 posts - 11 through 18 (of 18 total)