Forums Forums Search & Filter Pro Filters html and classes are changing after first submit

Tagged: , ,

Viewing 10 posts - 1 through 10 (of 14 total)
  • Anonymous
    #223923

    Hi there! I am using Ajax for my filters. When I first load my page, everything looks fine. I applied some styles to the filters and it’s ok. But when I click on a selected option on a filter and there is a first submit, it looks like the html code on the filters change so my CSS class don’t apply anymore. Also, the waiting time for the results to load is slow. Can you help?

    Trevor
    #223924

    Are you able to send me a live link/URL to your search page so I can take a look?

    Did you use Javascript to add the class and/or HTML when the page loads?

    Anonymous
    #223936
    This reply has been marked as private.
    Trevor
    #223942

    How did the classes come to be added then?

    Anonymous
    #223944
    This reply has been marked as private.
    Trevor
    #223948

    Ah. Do you know what that JavaScript is?

    Anonymous
    #223989

    Unfortunately not! My colleague told me I will have to make a thorough search to find that Javascript and copy it in my results.php file to solve the problem. Is there any other easier way?

    Trevor
    #223997

    It would not need copying there, but you would need to find it, yes. It would be needed in a short JavaScript snippet to re-initialize it.

    If you have a complete copy of the site files/folders on a local computer, you could use a tool to do the search. On my PC I use Notepad++ to do this.

    You should look for ui-id

    If this is part of the theme, can the theme author help?

    The only alternative is to turn off Ajax.

    Anonymous
    #224011

    I really have to use Ajax and yes, maybe the theme author can help too. I will contact them. Thanks a lot!

    Trevor
    #224016

    The code snippet will fit in to our exemplar code like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
    
    // call your function here
    
      });
    }(jQuery));</script>
Viewing 10 posts - 1 through 10 (of 14 total)