Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Re-initialise scripts

  • This topic has 3 replies, 3 voices, and was last updated 4 years ago by Ross.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Martin
    #238024

    Hi,

    I can’t find an answer elsewhere, so please point me there if this has been covered before.

    Is there a way to reload the S&F scripts when navigating through a site that uses ajax?

    Kind of the opposite of :

    //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”);
    });

    Something like, on page load init S&F.

    Hope I’m making sense!

    Trevor Moderator
    #238032

    The site is, in effect, being loaded all on the same page (e.g. the Home page)? If so, I will need to refer this to our developer, Ross, for his input.

    Martin
    #238035

    Kind of yes, when you go to a new page it doesn’t fully reload the page only the ‘new’ parts so it doesn’t fully initialize plugins.

    I had a similar problem with contact form 7 for instance and there was a function to add when navigating along the lines of: wpcf7.initForm( $form );

    Ross Moderator
    #238166

    Hi Martin

    Sure you can do this, as long as your script runs after dom ready (so S&F JS has been setup) then you can do:

    $(".searchandfilter").searchAndFilter();

    Thanks

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

You must be logged in to reply to this topic.