Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (75 sloc) 3.03 KB
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Flux Slider Demo &#0187; 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 &copy; 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>