Created
April 10, 2011 17:36
-
-
Save haacked/912552 to your computer and use it in GitHub Desktop.
Sample jQuery File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Index</title> | |
| <script src="../../Scripts/jquery-1.5.1.js" type="text/javascript"></script> | |
| <script src="../../Scripts/jquery.validate.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| $(function () { | |
| $("#form").validate({ | |
| rules: { | |
| accountType: "checked" | |
| }, | |
| messages: { | |
| accountType: "You must select an account type" | |
| } | |
| }); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <div> | |
| <form id="form" method="post" action="/"> | |
| <label>Select an Account Type</label> | |
| <input type="text" name="foo" class="required" /> | |
| <input type="radio" name="accountType" value="1" id="accountType_C" /><label for="accountType_C" >Coder</label> | |
| <input type="radio" name="accountType" value="0" id="accountType_S" /><label for="accountType_S">Surreptitious Ninja</label> | |
| <input type="submit" /> | |
| </form> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With message: