Change galleriffic delay time dynamically?
Does anyone know how to change the Galleriffic delay time dynamically?
I know the time can be set on initialization, but I would like to use a javascript slider on the page to allow the visitor to change the speed of the slideshow.
I am using scriptaculous.js and prototype.js for the slider control, something like this:
<script type="text/javascript">
(function() {
var zoom_slider = $('zoom_slider');
new Control.Slider(zoom_slider.down('.handle'), zoom_slider, {
range: $R(2, 10),
sliderValue: 5,
onSlide: function(value) {
gSpeed = parseInt(value)*1000;
GalSpeed(gSpeed);
},
onChange: function(value) {
gSpeed = parseInt(value)*1000;
GalSpeed(gSpeed);
}
});
})();
</script>
I'd like to pass the gSpeed value to the gallery parameters:
(of course, this doesn’t work, but something like this)
function GalSpeed(gSpeed)
{
function ()
{
$('#thumbs').galleriffic.delay:gSpeed;
}
}
Thanks
Dave