Created
September 23, 2015 07:31
-
-
Save afalchi82/0ab0f7587c6e1d9e9620 to your computer and use it in GitHub Desktop.
Add slide to FlexSlider 2
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 s = $('.flexslider'), | |
// Clone another slide markup | |
newSlide = s.find('li').eq(0).clone() | |
// Change image source | |
.find('img').attr('src', 'http://www.awwwards.com/awards/submissions/2015/09/5601375a79570.jpeg') | |
// Return parent element | |
.end(); | |
s.data('flexslider').addSlide(newSlide, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment