Alan
Alan

Reputation: 3058

jquery cycle: return to the first slide

The slideshow can be stoped by:

$(this).cycle('stop');

Or it can be paused by:

$(this).cycle('pause');

But how can I stop/pause the slideshow and return to the first slide at the same time?

Upvotes: 2

Views: 3198

Answers (3)

Matthew McVickar
Matthew McVickar

Reputation: 92

It's important here to make sure you're using the full version of the jQuery Cycle plugin, not the 'lite' version. The goto behavior is not supported in the lite version.

Upvotes: 0

Tyler Carter
Tyler Carter

Reputation: 61557

Goto Starting Slide

$('#goto1').click(function() { 
    $('#s1').cycle(0); 
    return false; 
}); 

From http://malsup.com/jquery/cycle/goto.html

Upvotes: 10

Abu Aqil
Abu Aqil

Reputation: 804

just define it eg:

$(this).cycle('stop').cycle({
    startingSlide: 1
});

Upvotes: 2

Related Questions