Last active
January 26, 2017 17:11
-
-
Save jessgusclark/833b9b591a16f27290a6d09104ff33b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8"> | |
$(window).load(function() { | |
// get the total number of slides: | |
var numberOfSlides = $(".slides li").size(); | |
// select a random number between 0 and numberOfSlides. | |
var randomStart = Math.floor( Math.random() * numberOfSlides ); | |
$('.flexslider').flexslider({ | |
startAt: randomStart | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment