AnythingSlider playground
Add, remove, adjust any or all options so you can see how it works.
by Mottie
HTML
<link rel="stylesheet" href="http://css-tricks.github.com/AnythingSlider/css/anythingslider.css">
<script src="http://css-tricks.github.com/AnythingSlider/js/jquery.anythingslider.js"></script>
<script src="http://css-tricks.github.com/AnythingSlider/js/jquery.easing.1.2.js"></script>
<script src="http://css-tricks.github.com/AnythingSlider/js/swfobject.js"></script>
<script src="http://css-tricks.github.com/AnythingSlider/js/jquery.anythingslider.fx.js"></script>
<script src="http://css-tricks.github.com/AnythingSlider/js/jquery.anythingslider.video.js"></script>
<br>
<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://placebear.com/300/200" alt="" /></li>
<li><img src="http://lorempixel.com/300/200" alt="" /></li>
<li><img src="http://placedog.com/300/200" alt="" /></li>
</ul>
CSS
/*** Set Slider dimensions here! Version 1.7+ ***/
/* added #slider li to make panels the same size in case "resizeContents" is false */
ul#slider, ul#slider li {
width: 300px;
height: 200px;
list-style: none;
}
.anythingSlider-default .arrow {
top: 0;
}
.anythingSlider-default .arrow a {
width: 20px; /* reduce arrow width to 20px */
height: 200px;
background: #999;
color: white;
margin: 0;
text-decoration: none;
}
.anythingSlider-default .arrow a:hover {
background: #ccc;
}
/* reduce overall window left/right padding to 20px so arrows fit to sides*/
.anythingSlider-default {
padding: 0 20px 28px 20px;
}
/* show default arrow text (forwardText & backText) */
.anythingSlider-default .arrow span {
visibility: visible;
position: relative;
top: 50%;
}
JavaScript
$('#slider').anythingSlider({
// Link text used to move the slider forward
// (hidden by CSS, replaced with arrow image)
forwardText: "»",
// Link text used to move the slider back
// (hidden by CSS, replace with arrow image)
backText: "«"
});