AnythingSlider playground
Add, remove, adjust any or all options so you can see how it works.
by Mottie
HTML
<script src="http://proloser.github.com/AnythingSlider/js/jquery.anythingslider.js"></script>
<link rel="stylesheet" href="http://proloser.github.com/AnythingSlider/css/anythingslider.css">
<script src="http://proloser.github.com/AnythingSlider/js/jquery.easing.1.2.js"></script>
<script src="http://proloser.github.com/AnythingSlider/js/swfobject.js"></script>
<script src="http://proloser.github.com/AnythingSlider/js/jquery.anythingslider.fx.js"></script>
<ul id="slider">
<li><img src="http://placekitten.com/300/200" alt="" /></li>
<li><img src="http://placehold.it/300x200" alt="" /></li>
<li><img src="http://ipsumimage.appspot.com/300x200.png" alt="" /></li>
<li><img src="http://dummyimage.com/300x200/000/fff.jpg" alt="" /></li>
</ul>
<!-- Add stylesheets here -->
<link rel="stylesheet" href="http://proloser.github.com/AnythingSlider/css/theme-metallic.css">
<!-- Older IE stylesheet, to reposition navigation arrows, added AFTER the theme stylesheet above -->
<!--[if lte IE 7]>
<link rel="stylesheet" href="http://proloser.github.com/AnythingSlider/css/anythingslider-ie.css" type="text/css" media="screen" />
<![endif]-->
CSS
/*** Set Slider dimensions here! Version 1.7+ ***/
#slider {
width: 300px;
height: 200px;
list-style: none;
}
/* This CSS is needed for the fading transition */
#slider { background: #000; } /* black background makes fading less flashy */
#slider .panel { opacity: 0; }
#slider .panel.activePage { opacity: 1; } /* make sure active panel is visible */
JavaScript
$('#slider')
.anythingSlider({
// zero time between slide transitions
animationTime : 0,
// set this delay to fade out the current slide before animating
// set here to match the fade time
delayBeforeAnimate : 500
})
.anythingSliderFx({
// target the entire panel and fade will take 500ms
// set opacity (value after the 'fade'),
// the value must be between 0 and 1
// (1 = 100% opacity and is the default)
'.panel' : [ 'fade', '', 500, 'easeInOutCirc' ]
});