Reputation: 1
I have a project that I am working on that uses Start/Stop slider by Chris Coyier shown here http://css-tricks.com/startstop-slider. The client loves it, but now wants it to to just cycle through once and stop. Also after it cycles and stops the "Stop" button to turn to "Start" so that if the user wants to play it again they can.
I am a newbie at jquery/Javascript and am having no luck figuring this out.
Thank you for your help
Upvotes: 0
Views: 1319
Reputation: 1428
You need to update the doMove
function and clear the interval after the slide has completed 1 revolution
if (movement == tooFar) {
$(".slide img").animate({
"top": -200
}, function() {
$("#mover").animate({
"left": 0
}, function() {
$(".slide img").animate({
"top": 20
});
});
});
clearInterval(sliderIntervalID);
$("#slider-stopper").text("Start");
}
Upvotes: 1