Slider Auto Slide/Step
Slider Auto Slide/Step
I have built a promo area on my site, and I am using the slider to
scroll through the promo's.
http://www.deviantstudio.ca,
but I would also like the steps that it takes to start automatically
and pause for a duration of time on each promo how can I implement
that into the following code.
<script type="text/javascript">
$(document).ready(function(){
$("#content-slider").slider({
animate: true,
step: 33.5,
change: handleSliderChange,
slide: handleSliderSlide
});
});
function handleSliderChange(e, ui)
{
var maxScroll = $("#content-scroll").attr("scrollWidth") - $
("#content-scroll").width();
$("#content-scroll").animate({scrollLeft: ui.value * (maxScroll /
100) }, 1000);
}
function handleSliderSlide(e, ui)
{
var maxScroll = $("#content-scroll").attr("scrollWidth") - $
("#content-scroll").width();
$("#content-scroll").attr({scrollLeft: ui.value * (maxScroll /
100) });
}
</script>
Thanks for any help, its much appreciated.