cycle2
cycle2 copied to clipboard
Idea: cycle-loop-complete event
There are events fired on each individual slide change, but as far as I can tell, there isn't one fired when a single "loop" has completed. This data is stored in the plugin somewhere, for use with the loop count option, and there is an event triggered when the cycle finished due to this.
Would it be possible to expose this as an event? In particular, it would be helpful in conjunction with the cycle transition, which isn't always as easy detect the active position in as the other transitions, due to it generating extra slide elements to allow it to display properly.
You can do that with the existing events and objects:
$('#slideshow').on('cycle-after', function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { if (optionHash.slideNum == optionHash.slideCount) { //the slideshow has looped } });