- This topic has 1 reply, 2 voices, and was last updated 6 years, 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › How to add event on submit button?
You would need to add some of your own (or third party) javascript to do this, but it is possible. The JavaScript would look something like this:
(function ( $ ) {
"use strict";
//detects the start of an ajax request being made
$(document).on("sf:ajaxstart", ".searchandfilter", function(){
console.log("ajax start");
//show your loader
});
//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");
//hide your loader
});
}(jQuery));
But you would need to actually add something to this code (and maybe to the page) to actually show and hide.