Skip to content Skip to sidebar Skip to footer

Display Loading Gif After Parsley.js Validates Form

Have a an upload form with some required fields which uses parsley.js to validate. I want to display a loading gif after the form has been validated and the actual uploading starts

Solution 1:

You'll have to use Parsley events (http://parsleyjs.org/doc/index.html#psly-events-list) and do something like that:

$('#form').parsley().subscribe('parsley:form:validated', function (parsleyForm) {
  if (true === parsleyForm.validationResult )
     // display gifelse// do something else, or nothing
});

Best

Post a Comment for "Display Loading Gif After Parsley.js Validates Form"