Hello everyone,
I spent a while figuring out how to get a Js slideshow to work on a website and then my client asked me to add a pause, play, back and forward button to it. I haven’t had any luck trying to add one so I was wondering if anyone could lend me a hand.
Here is the code for the slideshow:
[CODE]
<script type=”text/javascript”>
$(document).ready(function(){
$(“.samples img”).fadeTo(“normal”, 1.0); // This sets the opacity of the samples to fade down to 60% when the page loads
$(“.samples img”).hover(function(){
$(this).fadeTo(“normal”, 0.6); // This should set the opacity to 100% on hover
},function(){
$(this).fadeTo(“normal”, 1.0); // This should set the opacity back to 60% on mouseout
});
});
</script>
[CODE]
start_slideshow(1, 10, 13000);
function start_slideshow(start_frame, end_frame, delay) {
setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay);
}
function switch_slides(frame, start_frame, end_frame, delay) {
return (function() {
Effect.Fade(‘slideshow’ + frame);
if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; }
setTimeout(“Effect.Appear(‘slideshow” + frame + “‘);”, 850);
setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850);
})
}
Thanks.