forked from parndt/jquery-html5-placeholder-shim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.html
103 lines (96 loc) · 2.33 KB
/
test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<style>
html {
background-color:#ddd;
padding:10px;
}
body {
text-align:center;
background-color:#ccc;
padding:10px;
font-family:sans-serif;
}
#wrap {
padding:2em;
margin:20px auto;
background-color:#fff;
border:3px solid #999;
text-align:left;
width:90%;
}
#wrap input {
width:300px;
}
input.small {
font-size:10px;
}
input.medium {
font-size:15px;;
}
input.large {
font-size:1.4em;
}
input.xl {
font-size:3em;
}
#wrap label{
display:block;
float:left;
width:140px;
}
#cont {
position:relative;
margin:5px;
}
#cont div {
padding:5px;
margin:5px;
zoom:1;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script>
<script src="jquery.html5-placeholder-shim.js"></script>
<!-- <script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script> -->
<script>
$(function(){
$.placeholder.shim();
});
</script>
</head>
<body>
<div id="wrap">
<h2>Basic Examples</h2>
<a href="#" onclick="$('#cont').toggle();return false;">hide form</a>
<a href="#" onclick="$('#medium').toggle();$.placeholder.shim();return false;">hide medium row</a>
<div id="cont" >
<div>
<label>small</label>
<input type="text" placeholder="placeholder" class="small" />
<input type="text" placeholder="placeholder" value="value" class="small" />
</div>
<div id="medium">
<label>medium</label>
<input type="text" placeholder="placeholder" class="medium" />
<input type="text" placeholder="placeholder" value="value" class="medium" />
</div>
<div>
<label>large</label>
<input type="text" placeholder="placeholder" class="large" />
<input type="text" placeholder="placeholder" value="value" class="large" />
</div>
<div>
<label>XL</label>
<input type="text" placeholder="placeholder" class="xl" />
<input type="text" placeholder="placeholder" value="value" class="xl" />
</div>
<div>
<label>too long</label>
<input type="text" placeholder="too much text shouldn't overflow... too much text shouldn't overflow... too much text shouldn't overflow" class="" />
<input type="text" placeholder="too much text shouldn't overflow... too much text shouldn't overflow... too much text shouldn't overflow" value="value" class="" />
</div>
</div>
</div>
</body>
</html>