jQuery UI Dialog validation without using <form> tags

前端 未结 11 1746
北荒
北荒 2020-12-23 20:40

http://bassistance.de/jquery-plugins/jquery-plugin-validation/ looks to be the best jquery validation plugin out there. I can\'t seem to get it working in the jQuery UI dial

11条回答
  •  -上瘾入骨i
    2020-12-23 21:13

    In case someone else comes across this, the jQuery-UI dialog does not append to the form, it appends just before , so the elements to validate are outside the

    section:

    To resolve this, just direct the dialog to move itself inside the form when you create it, like this:

    $("#mydiv").dialog("open").parent().appendTo(jQuery("form:first"));
    

提交回复
热议问题