javascript - Display loading gif after parsley.js validates form -


have upload form required fields uses parsley.js validate. want display loading gif after form has been validated , actual uploading starts.

i've tried using onsubmit event call function changes visibility of loading gif hidden visible. gif shows when ever upload button clicked if form has not been validated.

thanks in advance!

you'll have use parsley events (http://parsleyjs.org/doc/index.html#psly-events-list) , that:

$('#form').parsley().subscribe('parsley:form:validated', function (parsleyform) {   if (true === parsleyform.validationresult )      // display gif   else      // else, or nothing }); 

best


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -