Created
July 25, 2016 06:46
-
-
Save dominicgan/5fa5299aa6986bf0d5ab47e69341df4d to your computer and use it in GitHub Desktop.
Initialize flickity
This file contains 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
var slider = document.querySelector('#slider'); | |
imagesLoaded(slider, function() { | |
// load flickity only when images have all loaded | |
var flkty = new Flickity( slider, { | |
cellAlign: 'left', | |
contain: true, | |
prevNextButtons: false, | |
pageDots: false, | |
autoPlay: 2000, | |
wrapAround: true, | |
selectedAttraction: 0.01, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment