Forums › Forums › Search & Filter Pro › Looks like Submit button isn’t working because of delay
Tagged: loading, Search and filter form, submit button
- This topic has 13 replies, 2 voices, and was last updated 6 years ago by
Anonymous.
-
Anonymous(Private) September 22, 2020 at 5:10 pm #260389
Just one more question: I work with multiple forms. I know how to add the css rules but am not sure how to add those to the script. Just like this?
<script>(function ( $ ) {
“use strict”;
$(document).on(“sf:ajaxformstart”, “.searchandfilter”, function(){
$(‘.searchandfilter[data-sf-form-id=”10574″, data-sf-form-id=”13928″] li.sf-field-submit input’).addClass(‘disabled’);
});
$(document).on(“sf:ajaxformfinish”, “.searchandfilter”, function(){
$(‘.searchandfilter[data-sf-form-id=”10574″, data-sf-form-id=”13928″] li.sf-field-submit input’).removeClass(‘disabled’);
});
}(jQuery));</script>Trevor(Private) September 22, 2020 at 5:15 pm #260391You could simplify the code is you want it on all forms:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxformstart", ".searchandfilter", function(){ $('.searchandfilter li.sf-field-submit input').addClass('disabled'); }); $(document).on("sf:ajaxformfinish", ".searchandfilter", function(){ $('.searchandfilter li.sf-field-submit input').removeClass('disabled'); }); }(jQuery));</script>I think that might work. They are not on the same page, are they?
If this works, is it OK to close this thread?
-
AuthorPosts