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>
<center><button>Activate</button><button>Deactivate</button></center>
<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://ipsumimage.appspot.com/300x200.png" alt="" /></li>
<li><img src="http://dummyimage.com/300x200/000/fff.jpg" alt="" /></li>
</ul>
CSS
/* Conditional comments don't work in this playground, If testing in IE7 or older browsers, uncomment out the CSS below:
Also note, this may not work properly on themes other than the default as the chosen theme stylesheet is loaded after this CSS and will over-ride it */
/*
div.anythingSlider .arrow {
top: 35% !important;
}
div.anythingSlider-metallic .arrow {
top: 40% !important;
}
div.anythingSlider-construction .arrow {
top: 14% !important;
}
div.anythingSlider-minimalist-round .arrow , div.anythingSlider-minimalist-square .arrow {
top: 45% !important;
}
div.anythingSlider-cs-portfolio .arrow {
bottom: -24px !important;
}
div.anythingSlider .arrow a,
div.anythingSlider-metallic .arrow a,
div.anythingSlider-minimalist-square .arrow a,
div.anythingSlider-construction .arrow a,
div.anythingSlider-minimalist-round .arrow a {
margin: 0 !important;
}
*/
JavaScript
$('#slider').anythingSlider({
width: 300,
height: 200,
startStopped: true
});
// Activate
$('button:first').click(function(){
var s = $('#slider')
s.addClass('anythingBase');
s.parent().addClass('anythingWindow');
s.parent().parent()
.addClass('anythingSlider')
.find('.anythingControls, .arrow, .cloned').show();
});
// Deactivate
$('button:last').click(function(){
var s = $('#slider');
s.data('AnythingSlider').startStop(false); // stops the slideshow
s.removeClass('anythingBase');
s.parent().removeClass('anythingWindow');
s.closest('.anythingSlider')
.removeClass('anythingSlider')
.find('.anythingControls, .arrow, .cloned').hide();
});