Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (54 sloc) 1.33 KB
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>jQuery.AutoFill Demo</title>
</head>
<body>
<p>
<label>Default Behavior:</label><br />
<input type="text" id="txtName" />
</p>
<p>
<label>Search:</label><br />
<input type="text" id="txtSearch" />
</p>
<p>
<label>Password:</label><br />
<input type="password" id="pwdPassword" />
</p>
<p>
<label>Web site:</label><br />
<input type="text" id="txtWebsite" />
</p>
<p>
<label>Text Area: </label><br />
<textarea id="test-textarea"></textarea>
</p>
<script src="http://www.google.com/jsapi"></script>
<script>
google.load('jquery','1.4.1');
</script>
<script src="jquery.autofill.js"></script>
<script>
$(document).ready(function(){
$('#txtName').autofill();
$('#txtSearch').autofill({
value: 'Search for Keyword(s)'
});
$('#pwdPassword').autofill({
value: 'Password',
defaultTextColor: '#666',
activeTextColor: '#333'
});
$('#txtWebsite').autofill({
value: 'Website',
prePopulate: 'http://'
});
$('#test-textarea').autofill({
value: "test\nwith\n\newlines"
});
});
</script>
</body>
</html>