Unable to display GIF while submitting form after

2019-08-23 10:18发布

I want to display GIF on form submitting after parsley is a success, so the condition is only after submitting form field and validation in the success I need to show gif only when the form is submitting

I tried

$(document).ready(function () {
     $('#adform').parsley({
              trigger: 'change',
              successClass: "is-valid",
              errorClass: "is-invalid text-danger",
              errorsWrapper: '<div class="input-group"></div>',
              errorTemplate: '<small class="form-text text-danger"></small>',
     });
 })
       .submit('form:submit', function () {
            $("#subloa").css("display", "block");
        });

but doesn't trigger validation.

so how do I show GIF in parsley?

1条回答
Ridiculous、
2楼-- · 2019-08-23 10:53

Try

$(document).ready(function () {
     $('#adform').parsley({
              trigger: 'change',
              successClass: "is-valid",
              errorClass: "is-invalid text-danger",
              errorsWrapper: '<div class="input-group"></div>',
              errorTemplate: '<small class="form-text text-danger"></small>',
     })
       .on('form:submit', function () {
            $("#subloa").css("display", "block");
        });
});
查看更多
登录 后发表回答