-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (74 loc) · 1.98 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<title>Slide Show</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<link href="style.css" media="screen, projection" rel="stylesheet" type="text/css" />
</head>
<body>
<header>
<h2>Fan-style slide show using CSS3 transforms</h2>
<a href="https://github.com/prajwalit/slideshow" title="github" target="_blank">Get Source</a> |
<a href="http://prajwalit.com" title="Home" target="_blank">Prajwalit.com</a>
</header>
<div class="doc">
<section id="window">
<ul>
<li>
<article>
<img src="slides/1.jpg">
</article>
</li>
<li>
<article>
<img src="slides/2.jpg">
</article>
</li>
<li>
<article>
<img src="slides/3.jpg">
</article>
</li>
<li>
<article>
<img src="slides/4.jpg">
</article>
</li>
<li>
<article>
<img src="slides/5.jpg">
</article>
</li>
</ul>
</section>
</div>
<footer>
</footer>
<script type="text/javascript" src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>
<script type="text/javascript">
YUI ().use ("node", function (Y) {
var slides = Y.all ("ul li");
var counter=1, size = slides.size ();
window.slides = slides;
var revert = function (node, i) {
window.setTimeout (function () {
node.removeClass ("show");
},150*i)
};
var intr = window.setInterval (function () {
if (counter===size) {
for (var i=size-1;i>=1;i-=1) {
var node = slides.item (i);
revert (node, size-i-1);
}
counter = 1;
return;
}
slides.item (counter).addClass ("show");
counter+=1;
}, 3000);
});
</script>
</body>
</html>