Forums › Forums › Search & Filter Pro › Ajax integrate with other jQuery
Tagged: ajax
- This topic has 8 replies, 2 voices, and was last updated 4 years, 11 months ago by Trevor.
-
Anonymous(Private) February 26, 2020 at 8:10 am #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(Private) February 26, 2020 at 11:18 am #234921After 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>
Trevor(Private) February 26, 2020 at 1:18 pm #234952Not 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.
-
AuthorPosts