cycle2 icon indicating copy to clipboard operation
cycle2 copied to clipboard

Auto Initialization inconsistent when Cycle2 is loaded asynchronously.

Open kennykaye opened this issue 12 years ago • 4 comments

It appears when cycle 2 is loaded asynchronously, i.e. via $.ajax or as a requireJS dependency, auto initialization does not function properly.

Specifically, various API hooks such as bootstrap and initialized are not called. Additionally no sentinel slide is generated.

These issues were resolved my manually initializing after the script is loaded.

kennykaye avatar Sep 24 '13 21:09 kennykaye

Can you post a simplified link that demonstrates the issue? C2 should operate consistently regardless of how it is loaded.

malsup avatar Sep 25 '13 00:09 malsup

I'm having the same problem using RequireJS.

The script seems to be loaded but neither the html or jquery code seems to be working.

I get the "cycle2 init" on my console, but when i try to do a simple

$('.cycle-slideshow').cycle({ speed: 600, manualSpeed: 100 });

It doesnt do anything.

rafaelfaria avatar Jan 10 '14 00:01 rafaelfaria

Any good news on this? I'm using requireJS, something it works, but it often doesn't.

zukilover avatar Apr 04 '15 06:04 zukilover

I know it's been a while, lol -- but you have to destroy the cycle before re-initializing.

$('.cycle-slideshow').cycle('destroy'); $('.cycle-slideshow').cycle();

blakelyons avatar Apr 26 '20 17:04 blakelyons