Skip to content

Instantly share code, notes, and snippets.

@suissa
Created April 27, 2012 12:56
Show Gist options
  • Save suissa/2508971 to your computer and use it in GitHub Desktop.
Save suissa/2508971 to your computer and use it in GitHub Desktop.
Anything Slider
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>AnythingSlider Video Demo</title>
<link rel="shortcut icon" href="demos/images/favicon.ico">
<link rel="apple-touch-icon" href="demos/images/apple-touch-icon.png">
<!-- jQuery (required) -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>
<!-- Demo stuff -->
<link rel="stylesheet" href="demos/css/page.css">
<!-- Anything Slider optional plugins, but needed so the embeded video controls will work in IE -->
<!-- http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js -->
<script src="js/swfobject.js"></script>
<!-- Anything Slider -->
<link rel="stylesheet" href="css/anythingslider.css">
<script src="js/jquery.anythingslider.js"></script>
<!-- AnythingSlider video extension; optional, but needed to control video pause/play -->
<script src="js/jquery.anythingslider.video.js"></script>
<script>
// DOM Ready
$(function(){
$('#slider').anythingSlider({
theme : 'metallic',
hashTags : false,
autoplay: true,
buildNavigation : false,
autoPlay : true,
buildStartStop: false
});
/*API*/
/*
$('#slider1, #slider2').anythingSlider({
// Appearance
width : null, // Override the default CSS width
height : null, // Override the default CSS height
resizeContents : true, // If true, solitary images/objects in the panel will expand to fit the viewport
// Navigation
startPanel : 1, // This sets the initial panel
hashTags : true, // Should links change the hashtag in the URL?
buildArrows : true, // If true, builds the forwards and backwards buttons
buildNavigation : true, // If true, buildsa list of anchor links to link to each panel
navigationFormatter : null, // Details at the top of the file on this use (advanced use)
forwardText : "&raquo;", // Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
backText : "&laquo;", // Link text used to move the slider back (hidden by CSS, replace with arrow image)
// Slideshow options
autoPlay : true, // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
startStopped : false, // If autoPlay is on, this can force it to start stopped
pauseOnHover : true, // If true & the slideshow is active, the slideshow will pause on hover
resumeOnVideoEnd : true, // If true & the slideshow is active & a youtube video is playing, it will pause the autoplay until the video has completed
stopAtEnd : false, // If true & the slideshow is active, the slideshow will stop on the last page
playRtl : false, // If true, the slideshow will move right-to-left
startText : "Start", // Start button text
stopText : "Stop", // Stop button text
delay : 3000, // How long between slideshow transitions in AutoPlay mode (in milliseconds)
animationTime : 600, // How long the slideshow transition takes (in milliseconds)
easing : "swing" // Anything other than "linear" or "swing" requires the easing plugin
});
*/
});
</script>
<!-- Older IE stylesheet, to reposition navigation arrows, added AFTER the theme stylesheet above -->
<!--[if lte IE 7]>
<link rel="stylesheet" href="css/anythingslider-ie.css" type="text/css" media="screen" />
<![endif]-->
</head>
<body>
<!-- START AnythingSlider -->
<ul id="slider">
<!-- HTML5 Video -->
<li class="panel">
<video width="320" height="240" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
<!-- HTML5 Video -->
<li class="panel1">
<video width="320" height="240" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
<!-- HTML5 Video -->
<li class="panel2">
<video width="320" height="240" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
<!-- HTML5 Video -->
<li class="panel2">
<video width="320" height="240" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
<!-- HTML5 Video -->
<li class="panel2">
<video width="320" height="240" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
</li>
</ul> <!-- END AnythingSlider -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment