Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (43 sloc) 1.21 KB
<html>
<head>
<meta charset="utf-8">
<title>jQuery auto-placeholders</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="min/jquery.auto-placeholders.js"></script>
<style type="text/css">
.placeholder {
color: darkGray;
}
</style>
</head>
<body>
<form id="example_form">
<div>
<label for="name">Name:</label>
<input type="text" name="name" id="name" placeholder="John Doe" />
</div>
<div>
<label for="email">Email:</label>
<input type="text" name="email" id="email" placeholder="john@example.com" />
</div>
<div>
<label for="website">Website:</label>
<input type="text" name="website" id="website" placeholder="http://example.com" />
</div>
<div>
<label for="phone">Phone:</label>
<input type="text" name="phone" id="phone" placeholder="123456" />
</div>
<div>
<label for="message">Message:</label>
<textarea cols="40" rows="8" name="message" placeholder="Put your message here!"></textarea>
</div>
<div>
<input type="submit" />
</div>
</form>
</body>
<script>
$("#example_form").autoPlaceholders()
</script>
</html>