Created
October 17, 2014 15:56
-
-
Save daihuaye/309cdcb96c56fbc5d4ad to your computer and use it in GitHub Desktop.
Allow for Configuration and Translation
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
// Everything that is likely to change in your code should not be scattered throughout your code. | |
// By putting these into a configuration object and making this one public we make maintenance easy and allow for customization. | |
carousel = function(){ | |
var config = { | |
CSS:{ | |
classes:{ | |
current:'current', | |
scrollContainer:'scroll' | |
}, | |
IDs:{ | |
maincontainer:'carousel' | |
} | |
}, | |
labels:{ | |
previous:'back', | |
next:'next', | |
auto:'play' | |
}, | |
settings:{ | |
amount:5, | |
skin:'blue', | |
autoplay:false | |
}, | |
}; | |
function init(){ | |
}; | |
function scroll(){ | |
}; | |
function highlight(){ | |
}; | |
return {config:config,init:init} | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment