fabiorino / crelly-slider

A free responsive slider for WordPress that supports layers. Add texts, images, videos and beautify them with transitions and animations.
MIT License
104 stars 36 forks source link

Slide Sequence Issues (Out of order) #63

Closed ehmar closed 5 years ago

ehmar commented 5 years ago

I'm hacking my way though the demo.html file trying to get your slider working in Drupal. I shuffled around the slides in the following order (changed the order of each <li> in demo.html)...

  1. "Hello"
  2. "Crelly Slider"
  3. "It's Free"
  4. "Create Slides"

But it doesn't seem to play back in the same order.

"Hello" seems to always be first, but depending on which browser and refresh, slides 2-4 are in a different order.

I went back to your original demo.html file and noticed it does the same thing. You have "It's Free" first in the html, but after that, the following slides change order on refresh.

Is there a setting to control the order, or something to disable the randomness of the order?

Thanks (and thanks for creating & sharing your work)

fabiorino commented 5 years ago

Apparently randomOrder is set to true by default, just change it to false and it should work. Here's a list of all defaults if you're interested:

layout: 'fixed',
responsive: true,
startWidth: 1140,
startHeight: 500,

pauseOnHover: true,
automaticSlide: true,
randomOrder: true,
startFromSlide: 0, // -1 is random, >= 0 is the exact index
showControls: true,
showNavigation: true,
showProgressBar: true,
enableSwipe: true,

slidesTime: 3000,
elementsDelay: 0,
elementsTime: 'all',
slidesEaseIn: 300,
elementsEaseIn: 300,
slidesEaseOut: 300,
elementsEaseOut: 300,
ignoreElementsEaseOut: false,

videoAutoplay: false,
videoLoop: false,
videoStartMute: false,
videoPauseWhileWatching: true,

beforeStart: function() {},
beforeSetResponsive: function() {},
beforeSlideStart: function() {},
beforePause: function() {},
beforeResume: function() {},
ehmar commented 5 years ago

Thanks for the help. I missed that entry in the demo file.