-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimate.html
171 lines (148 loc) · 3.22 KB
/
animate.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<html>
<head>
<!-- Locks Web-Kit down on iPhone and Android, setting the
initial view to occupy the entire screen and not allowing
the user to scale the viewport. -->
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<!-- jQuery lite (JQLite) -->
<script src="jqlite.1.1.2.min.js" type="text/javascript"></script>
<!-- jQAnimation extension -->
<script src="extensions/jq.animation.min.js" type="text/javascript"></script>
<style type="text/css">
body {
font: 10pt Arial,Helvetica,Sans-serif;
margin-left: 5px;
margin-right: 5px;
}
div.showUp {
background: #00f;
color: white;
font-weight: bold;
display:none;
width: 120px;
height: 120px;
border: 2px solid #aaf;
margin-top: 10px;
}
div.button {
border: 1px solid;
background: silver;
padding: 8px;
display: inline-block;
cursor: pointer;
margin-right: 15px;
}
div.grower,
div.mover {
background: #f00;
color: white;
font-weight: bold;
width: 120px;
height: 120px;
border: 2px solid #faa;
margin-top: 10px;
position: relative;
}
div.expander {
background: #ff0;
color: black;
font-size: 14px;
margin-top: 10px;
border: 1px solid;
display: inline-block;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$("div.button1").click(function() {
$("div.showUp").show(3000);
});
$("div.button2").click(function() {
$("div.showUp").hide(1000);
});
$("div.button3").click(function() {
$("div.mover").animate({
left: "+=80"
});
});
$("div.button4").click(function() {
$("div.mover").animate({
left: "-=80"
});
});
$("div.button5").click(function() {
$("div.expander").animate({
fontSize: "24px"
});
});
$("div.button6").click(function() {
$("div.expander").animate({
fontSize: "14px"
});
});
$("div.button7").click(function() {
$("div.grower").animate({
width: "240px"
}).animate({
height: "240px"
});
});
$("div.button8").click(function() {
$("div.grower").animate({
width: "120px"
}).animate({
height: "120px"
});
});
});
</script>
</head>
<body>
<h1>jQAnimation - jQuery FX library extension</h1>
<p>
The following is a test of extending jQLite with the jQuery
animation libraries.
</p>
<div class="button button1">
Show Box
</div>
<div class="button button2">
Hide Box
</div>
<div class="showUp">
Are we visible yet?
</div>
<hr/>
<div class="button button3">
Move Right
</div>
<div class="button button4">
Move Left
</div>
<div class="mover">
Am I moving Yet?
</div>
<hr/>
<div class="button button5">
Expand
</div>
<div class="button button6">
Shrink
</div> <br/>
<div class="expander">
Getting Bigger?
</div>
<hr/>
<div class="button button7">
Bigger
</div>
<div class="button button8">
Smaller
</div> <br/>
<div class="grower">
Width & Height
</div>
<hr/>
<a href="index.html"><< Back to demo page</a>
</body>
</html>