-
Notifications
You must be signed in to change notification settings - Fork 285
/
demo_transition_gallery.html
82 lines (75 loc) · 3.03 KB
/
demo_transition_gallery.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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Flux Slider Demo » Hardware accelerated image transitions using CSS3</title>
<!--[if lte IE 8]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" title="no title" charset="utf-8">
<!-- Use Zepto for best performance on WebKit based browser -->
<!-- <script src="js/zepto/zepto.js" type="text/javascript" charset="utf-8"></script> -->
<!-- Use jQuery for best compatibility with other CSS3 enabled browsers -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/flux.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
if(!flux.browser.supportsTransitions)
alert("Flux Slider requires a browser that supports CSS3 transitions");
window.f = new flux.slider('#slider', {
autoplay: false,
pagination: false
});
// Setup a listener for user requested transitions
$('div#transitions').bind('click', function(event){
event.preventDefault();
// If this is a 3D transform and the browser doesn't support 3D then inform the user
if($(event.target).closest('ul').is('ul#trans3d') && !flux.browser.supports3d)
{
alert("The '"+event.target.innerHTML+"' transition requires a browser that supports 3D transforms");
return;
}
window.f.next(event.target.href.split('#')[1]);
});
});
</script>
</head>
<body id="transitiongallery">
<section class="container">
<h1><span class="flux">Flux</span> <span class="slider">Slider</span></h1>
<h2>Hardware accelerated image transitions using CSS3.</h2>
<div id="slidercontainer">
<div id="slider">
<img src="img/avatar.jpg" alt="" />
<img src="img/ironman.jpg" alt="" />
<img src="img/tron.jpg" alt="" />
<img src="img/greenhornet.jpg" alt="" />
</div>
<div id="transitions">
<h2>2D Transitions</h2>
<ul id="trans2D">
<li><a href="#bars">Bars</a></li>
<li><a href="#zip">Zip</a></li>
<li><a href="#blinds">Blinds</a></li>
<li><a href="#blocks">Blocks</a></li>
<li><a href="#concentric">Concentric</a></li>
<li><a href="#warp">Warp</a></li>
<li><a href="#slide">Slide</a></li>
</ul>
<h2>3D Transitions</h2>
<ul id="trans3d">
<li><a href="#bars3d">Bars3D</a></li>
<li><a href="#cube">Cube</a></li>
<li><a href="#tiles3d" class="new">Tiles3D</a></li>
<li><a href="#blinds3d" class="new">Blinds3D</a></li>
<li><a href="#turn" class="new">Turn</a></li>
</ul>
</div>
</div>
<footer>
<p>Flux Slider © Copyright 2011 Joe Lambert. All Rights Reserved. Follow me on Twitter <a href="http://www.twitter.com/joelambert">@joelambert</a></p>
<img src="img/html5.png" alt="HTML5" width="35px" />
</footer>
</section>
</body>
</html>