Looks like Submit button isn’t working because of delay

Forums › Forums › Search & Filter Pro › Looks like Submit button isn’t working because of delay

  • This topic has 13 replies, 2 voices, and was last updated 6 years ago by Anonymous.
Viewing 4 posts – 11 through 14 (of 14 total)
  • Anonymous
    #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
    #260391

    You 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?

    Anonymous
    #260393

    Yes, it works. Thanks again!

    Anonymous
    #260395

    Yes, you can close this thread.

Viewing 4 posts – 11 through 14 (of 14 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.