Created
August 5, 2011 02:51
-
-
Save daffl/1126835 to your computer and use it in GitHub Desktop.
Simple complete jQuery dform example
This file contains 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> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title> KISS, based on fiddle example </title> | |
<script type='text/javascript' src='jquery-1.5.2.js'></script> | |
<script type="text/javascript" src="jquery-ui.js"></script> | |
<script type='text/javascript' src="jquery.dform-0.1.3.min.js"></ | |
script> | |
<link rel="stylesheet" type="text/css" href="jquery- | |
ui-1.8.4.custom.css"> | |
<link rel="stylesheet" type="text/css" href="main.css"> | |
<script type='text/javascript'> | |
$(window).load(function(){ | |
$("#myform").buildForm({ | |
"action" : "index.html", | |
"method" : "get", | |
"elements" : | |
[ | |
{ | |
"type" : "p", | |
"html" : "You must login" | |
}, | |
{ | |
"name" : "username", | |
"id" : "txt-username", | |
"caption" : "Username", | |
"type" : "text", | |
"placeholder" : "E.g. u...@example.com" | |
}, | |
{ | |
"name" : "password", | |
"caption" : "Password", | |
"type" : "password" | |
}, | |
{ | |
"type" : "submit", | |
"value" : "Login" | |
} | |
] | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<form id="myform"></form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment