Created
February 24, 2018 14:24
-
-
Save haingdc/ec3a8f5546fc8b1c951b8c445358c14f to your computer and use it in GitHub Desktop.
A Gentle Introduction to Functional JavaScript: Part 1
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
| function initialiseCarousel(id, frequency) { | |
| var el = document.getElementById(id); | |
| var slider = new Carousel(el, frequency); | |
| slider.init(); | |
| return slider; | |
| } | |
| initialiseCarousel('main-carousel', 3000); | |
| initialiseCarousel('news-carousel', 5000); | |
| initialiseCarousel('events-carousel', 7000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment