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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -