So I have jQuery cycle running and I need help on how to set the parameters so the slideshow cycles through once and then starts back on the first position and just stops. I have text that scroll through with the images. Now I can get the image to cycle back putting a function on "end" but the text on one does not activate when I do this, here is my parameters settings:
$.fn.cycle.defaults = {
fx开发者_Python百科: 'fade', // one of: fade, shuffle, zoom, scrollLeft, etc
timeout: 4000, // milliseconds between slide transitions (0 to disable auto
speed: 4000, // speed of the transition (any valid fx speed value)
pagerEvent: 'hover', // event which drives the pager navigation
end: function() {$('#slideshow').cycle('next'); },
sync: 1, // true if in/out transitions should occur simultaneously
nowrap: 1 // true to prevent slideshow from wrapping
};
Does anyone know who to get the cycle to run through just once and then jump back to one then just stop with the link activated again? I tried using the autostop and autoStopCount but I do not want to indicate an exact number to make it stop. Any help would be most appreciated.
See http://jquery.malsup.com/cycle/end.html and try this or something similar.
$('#slideshow').cycle({
autostop: 1,
end: function(options) {
$('#slideshow').cycle(0).cycle('stop');
}
});
精彩评论