Created
September 11, 2013 03:42
-
-
Save skhilko/6519118 to your computer and use it in GitHub Desktop.
Revealing Module Pattern: Keep consistent syntax and mix and match what to make global.
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
module = function(){ | |
var current = null; | |
var labels = { | |
'home':'home', | |
'articles':'articles', | |
'contact':'contact' | |
}; | |
var init = function(){ | |
}; | |
var show = function(){ | |
current = 1; | |
}; | |
var hide = function(){ | |
show(); | |
} | |
return{init:init, show:show, current:current} | |
}(); | |
module.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment