javascript - trigger colorbox resize on parsley validation -
ok using parsley.js validate , colorbox submit form via ajax
the problem facing cannot figure out how resize colorbox dynamically when validation errors appear.i trigger function when pasreley loads in errors.
$.colorbox.resize();
this form submit code looks like
$("#form").submit(function(e) { if ( $(this).parsley('validate')) { var postdata = new formdata(this); var formurl = $(this).attr("action"); $.ajax({}); }; e.preventdefault(); });
try
$.listen('parsley:field:error', function(){$.colorbox.resize();})
if wish handle error event. see official documentation know event want handle. http://parsleyjs.org/doc/index.html#psly-events-list
Comments
Post a Comment