testing.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=utf-8 />
  5. <title>Flux Slider Demo &#0187; Hardware accelerated image transitions using CSS3</title>
  6. <!--[if lte IE 8]>
  7. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  8. <![endif]-->
  9. <link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" title="no title" charset="utf-8">
  10. <!-- Use Zepto for best performance on WebKit based browser -->
  11. <!-- <script src="js/zepto/zepto.js" type="text/javascript" charset="utf-8"></script> -->
  12. <!-- Use jQuery for best compatibility with other CSS3 enabled browsers -->
  13. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
  14. <script src="js/flux.min.js" type="text/javascript" charset="utf-8"></script>
  15. <script type="text/javascript" charset="utf-8">
  16. flux.slider.prototype.showImageBase64 = function(b64) {
  17. this.stop();
  18. this.image1.css({
  19. 'background-image': this.image2.css('background-image'),//'url("'+this.getImage(this.currentImageIndex).src+'")',
  20. 'z-index': 101
  21. }).children().remove();
  22. this.image2.css({
  23. 'background-image': 'url("'+b64.attr('src')+'")',
  24. 'z-index': 100
  25. }).show();
  26. this.transition();
  27. }
  28. flux.slider.prototype.setupImages = function() {
  29. }
  30. $(function(){
  31. if(!flux.browser.supportsTransitions)
  32. alert("Flux Slider requires a browser that supports CSS3 transitions");
  33. window.f = new flux.slider('#slider', {
  34. pagination: false,
  35. autoplay: false
  36. });
  37. });
  38. </script>
  39. </head>
  40. <body>
  41. <section class="container">
  42. <h1><span class="flux">Flux</span> <span class="slider">Slider</span></h1>
  43. <h2>Hardware accelerated image transitions using CSS3.</h2>
  44. <div id="slider">
  45. <img src="img/avatar.jpg" alt="" />
  46. </div>
  47. <footer>
  48. <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>
  49. <img src="img/html5.png" alt="HTML5" width="35px" />
  50. </footer>
  51. <div style="display:none">
  52. <img id="image1" src="img/ironman.jpg" alt="" />
  53. <img id="image2" src="img/tron.jpg" alt="" />
  54. <img id="image3" src="img/greenhornet.jpg" alt="" />
  55. </div>
  56. </section>
  57. </body>
  58. </html>