Forums › Forums › Search & Filter Pro › auto submit delay duration
- This topic has 7 replies, 3 voices, and was last updated 5 years, 5 months ago by
Ross.
-
Anonymous(Private) August 3, 2020 at 10:30 pm #254938
Hi,
I found that the below events do not work properly if I have a submit button in the form and it works fine when I remove it which I am ok with.
$(document).on(“sf:ajaxstart”, “.searchandfilter”, function()
$(document).on(“sf:ajaxfinish”, “.searchandfilter”, function()But I need to increase the delay for the autosubmit of the search box. I understand from other posts on the forum that it is fixed, so could you please let me know where is this variable in the code to increase its value or let me know if there is a better way to increase it?
Thanks,
AhmedRoss Moderator(Private) August 5, 2020 at 5:45 pm #255190Hi Ahmed
Ajax events should work fine with or without specific fields / buttons.
Our plugins takes over the forms
.submit()and implements ajax, which is where the events are fired, regardless of what is used to get there.Take a look at this gif:
https://drive.google.com/file/d/1vHCt30TAKVGcwWYYgZwGmlapiOb8FmDU/view?usp=sharingAnyway, if you must implement the code change, you can take a look in our JS file
wp-content\plugins\search-filter-pro\public\assets\js\search-filter-build.jsAnd look for the function
initAutoUpdateEvents– everything is in there.Just to note, your site is probably calling our minified plugin file:
\search-filter-pro\public\assets\js\search-filter-build.min.js– so once you’ve made your code change, minify, and update this file.Best
Thanks
-
AuthorPosts