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

Loading…
Cancel
Save