cycle2
cycle2 copied to clipboard
Progressive loading with random order?
As far as I gather is isn't possible to have a random order of slides, when using progressive loading. Or is it?
Is it possible in cycle 1 maybe? (I've only tried in cycle 2)
Is this something that could even be pulled off in some future version?
It would be great if progressive loading could have use the random option.
Second that, progressive loading with a solution to randomly assign slides as per this Cycle 1 example would be fantastic… I am afraid I am not clever enough to take this example and apply to cycle2!
http://www.malsup.com/jquery/cycle/add3.html
Any ideas out there?
I can confirm that random doesn’t work properly with progressive image loading. Maybe It could be useful to add it in the “Progressive” page under the “Limitations” title, and of course better if someone find a solution :—)
This turns out to be an easy fix, if you add the opts.random check with a sort in the $(document).on( 'cycle-pre-initialize') function.
add to line 1426 if ( opts.random ) { slides.sort(function() {return Math.random() - 0.5;}); }
This turns out to be an easy fix, if you add the opts.random check with a sort in the $(document).on( 'cycle-pre-initialize') function.
Thank you! This has been annoying me for literally years.