jQuery validate Each -
i'm working on site many forms, use jquery validation script.
as now, need add form.validate() on forms. make general validation forms.
what came with, works on first form, , not other ones. can somehow make work on each form??
if ($('form').length) { $('form').validate({ submithandler: function() { alert("validated"); } }); }
can see do? ...or know better way???
thank in advance.
a longshot, since have no idea how plugin works expect wants work on object created single html form:
if($('form').length) { $('form').each(function(i) { $(this).validate({ submithandler: function() { alert('validated'); } }); } }
Comments
Post a Comment