/
example.html
43 lines (34 loc) · 1.21 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="ui.watermark.js"></script>
<style type="text/css">
section { display: block }
.watermark { color: #888; }
</style>
</head>
<body>
<section>
<form id="search">
<input type="text" placeholder="Type to search"><br><br>
</form>
<form id="signup">
<input type="password" placeholder="Type your password"><br><br>
<textarea placeholder="Type a description"></textarea><br><br>
</form>
<form id="default-value">
<input type="text" value="some default value" placeholder="a watermark">
</form>
</section>
<script type="text/javascript">
$(document).ready(function() {
$("#search").watermark();
$("#signup").watermark();
$("#default-value").watermark({ignoreDefaultValue: true});
});
</script>
</body>
</html>