Browse Source

Make random option more random

pull/246/head
Joel Walters 12 years ago
parent
commit
4a9f92d8a1
  1. 12
      responsiveslides.js

12
responsiveslides.js

@ -129,12 +129,12 @@
// Random order
if (settings.random) {
$slide.sort(function () {
return (Math.round(Math.random()) - 0.5);
});
$this
.empty()
.append($slide);
// Shuffle all slides
while ($slide.length) {
$this.append($slide.splice(Math.floor(Math.random() * $slide.length), 1));
}
// Get new children object
$slide = $this.children();
}
// Add ID's to each slide

Loading…
Cancel
Save