Created
July 15, 2014 13:55
-
-
Save ethanclevenger91/f8babcdb17e9d87e3ee6 to your computer and use it in GitHub Desktop.
Flexslider setOpts and getOpts - useful in particular for updating min and maxItems for responsive sites
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
slider.setOpts = function(opts) { | |
for (var opt in opts) { | |
slider.vars[opt] = opts[opt]; | |
} | |
slider.setup(); | |
} | |
slider.getOpts = function() { | |
return slider.vars; | |
} |
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
$(slider_selector).data('flexslider').setOpts({minItems: newNum, maxItems: newNum}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment