Last active
August 29, 2015 13:57
-
-
Save mattjburrows/9549991 to your computer and use it in GitHub Desktop.
JS code snippets for the "Swipe activated gallery" tutorial on medium. Article URL to be confirmed.
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(window, document, undefined) { | |
| // Variable that we are going to store our functionality onto. | |
| var App = {}; | |
| // Store the slide count. | |
| App.slideCount = 8; | |
| // Store a reference to the active slide. | |
| App.active = 0; | |
| // Store references to CSS classes for easy maintenance. | |
| App.classes = { | |
| hidden: 'is-hidden', | |
| active: 'is-active', | |
| animateIn: 'animate-in', | |
| animateOut: 'animate-out' | |
| }; | |
| // Store a reference to the animated state of the carousel. | |
| App.animating = false; | |
| // Wait for the page content to load before we initialise any functionality. | |
| window.addEventListener('DOMContentLoaded', function() {}); | |
| })(window, document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment