[jQuery] Apple Style Slider - Multiple Sliders on same page question
I would like to use the apple style slider on my site. Found great tutorials
on it and have 1 working. My question is how can I have more than 1?
Based on http://jqueryfordesigners.com/slider-gallery/ I set that up no
problem pulling my images from the database and so on....
My question is using that example I have
<div id="container_<?php echo $set_id;?>">
...code...
</div>
<div id="container_<?php echo $set_id;?>">
...code...
</div>
<div id="container_<?php echo $set_id;?>">
...code...
</div>
The <?php echo $set_id;?> is in no order so it could be 27, 3, 84
How could I modify this script from the example to get the $set_id?
<script type="text/javascript" charset="utf-8">
window.onload = function () {
var container = $('div.sliderGallery');
var ul = $('ul', container);
var itemsWidth = ul.innerWidth() - container.outerWidth();
$('.slider', container).slider({
min: 0,
max: itemsWidth,
handle: '.handle',
stop: function (event, ui) {
ul.animate({'left' : ui.value * -1}, 500);
},
slide: function (event, ui) {
ul.css('left', ui.value * -1);
}
});
};
</script>
Thanks,
Dave