Support Forums

Support Forums Forums Search & Filter Pro Ajax integrate with other jQuery

This topic is: resolved

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Misa M
    #234899

    Hello

    I’m using Search & Filter Pro and adding the table sort function in the result using jQuery called Tablesorter(https://mottie.github.io/tablesorter/docs/). It works great when the page opens, but because of Ajax, it stops working on the search result and after clicking pagination. Could you let me know where and how to call jQuery into your Ajax?

    The setting of Pagination I have is Display Results > Ajax Pagination > Pagination Type: Normal &
    Pagination selector: .pagination a and the related page is misanoart.co/flower_search .

    Hope you can help me the issue I’m having Ajax integrate with other jQuery.

    Thank you!

    Trevor Moderator
    #234921

    After you have filtered using Ajax in our plugin, you can use the script snippet to call your other script:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
    
    // call your function here
    
      });
    }(jQuery));</script>
    Misa M
    #234935

    Hi Trevor,

    Thank you for your answer so quickly.
    After placing the script snippet on function.php, the jQuery stoped completely… do you have any idea?

    Thank you!

    Trevor Moderator
    #234937

    That snippet does not go in that file. It would have to be placed on the page where the form is.

    Misa M
    #234948

    Hi Trevor

    I have replaced that snippet and function in header of the page using “Scripts n Styles” plugin, however still not working and stopped the function completely. Any ideas??

    Trevor Moderator
    #234952

    Not really, the code that I gave you, with you adding the other code to it, should do nothing, of course. Assuming you tested that and found that to be the case, you will need to seek the assistance of the author of the other code, as it may need modifying to work within another function.

    Misa M
    #234954

    Hi Travor

    Thank you for swift answer. Ok, I’ll try to find out the issue in jQuery doc, thank you!

    Misa M
    #234956

    Hi Trevor

    I confirmed the function is working now. Thank you for your help, you are star!

    Trevor Moderator
    #234963

    Thanks for letting me know. I will close this thread for now.

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

The topic ‘Ajax integrate with other jQuery’ is closed to new replies.