-
Notifications
You must be signed in to change notification settings - Fork 9
/
exampels.html
207 lines (176 loc) · 4.54 KB
/
exampels.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>textition.js</title>
<link href="styles.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="textition.js"></script>
<script>
$(function() {
// header
$('header span').textition({
autoplay: true,
handler: false,
interval: 3,
speed: 1,
map: {x: 50, y: 20, z: 500},
});
// axis x
$('#axis-x').textition({
map: {
x: 100,
y: 0,
z: 0
}
})
// autoplay
$('#autoplay').textition({
speed: 1,
animation: 'ease-out',
map: {
x: 200,
y: 100,
z: 0
},
autoplay: true,
interval: 1.5
})
// axis z
$('#axis-z').textition({
speed: 0.5,
map: {
x: 0,
y: 0,
z: 100
},
perspective: 30
})
// menu buttons
$('#buttons a').each(function() {
$(this).textition({
speed: 0.7,
handler: 'mouseenter mouseleave'
})
});
// handler on element
$('#sliding').textition({
speed: 0.5,
animation: 'ease-out',
map: {
x: 0,
y: 40,
z: 0
},
element: $('#arrow-next')
})
});
</script>
</head>
<body>
<!-- header -->
<header>
<h1>textition.js</h1>
<span>
<h2>jQuery plugin for text transitions</h2>
<h2>CSS3 text transitions</h2>
<h2>Make your words beautiful</h2>
</span>
</header>
<!-- nav -->
<nav>
<a href="http://dimajt.github.io/textition.js/#about">About</a>
<a href="http://dimajt.github.io/textition.js/#docs">Documentation</a>
<a href="#" class="active">Examples</a>
</nav>
<!-- section -->
<section>
<!-- axis x -->
<h3>Axis X</h3>
<div id="axis-x">
<p>Click this text to start textition</p>
<p>Transition occurs on the X axis</p>
</div>
<code>
<p>$('#axis-x').textition({</p>
<p> map: {x: 100, y: 0, z: 0}</p>
<p>})</p>
</code>
<!-- autoplay -->
<h3>Autoplay</h3>
<div id="autoplay">
<p>First text</p>
<p>Second text</p>
<p>Third text</p>
</div>
<code>
<p>$('#autoplay').textition({</p>
<p> speed: 1,</p>
<p> animation: 'ease-out',</p>
<p> map: {x: 200, y: 100, z: 0},</p>
<p> autoplay: true,</p>
<p> interval: 1.5</p>
<p>})</p>
</code>
<!-- axis z -->
<h3>Axis Z</h3>
<div id="axis-z">
<p>First text</p>
<p>Second text</p>
<p>Third text</p>
</div>
<code>
<p>$('#axis-z').textition({</p>
<p> speed: 0.5,</p>
<p> map: {x: 0, y: 0, z: 100},</p>
<p> perspective: 30</p>
<p>})</p>
</code>
<!-- menu buttons -->
<h3>Menu buttons</h3>
<div id="buttons">
<a>
<div>First item</div>
<div>One</div>
</a>
<a>
<div>Second item</div>
<div>Two</div>
</a>
<a>
<div>Third item</div>
<div>Three</div>
</a>
</div>
<code>
<p>$('#buttons a').each(function() {</p>
<p> $(this).textition({</p>
<p>  speed: 0.7,</p>
<p>  handler: 'mouseenter mouseleave'</p>
<p> })</p>
<p>});</p>
</code>
<!-- handler on element -->
<h3>Handler on element</h3>
<div id="sliding">
<p>With CSS3, we can add an effect when changing from one style to another, without using Flash animations or JavaScripts.</p>
<p>The effect will start when the specified CSS property changes value.</p>
<p>CSS3 transitions are effects that let an element gradually change from one style to another.</p>
</div>
<a id="arrow-next"></a>
<code>
<p>$('#sliding').textition({</p>
<p> speed: 0.5,</p>
<p> animation: 'ease-out',</p>
<p> map: {x: 0, y: 40, z: 0},</p>
<p> element: $('#arrow-next')</p>
<p>})</p>
</code>
</section>
<!-- footer -->
<footer>
<p>Dima Karpov © 2013</p>
<a href="http://dimakarpov.w.pw">dimakarpov.w.pw</a>
</footer>
</body>
</html>