Created
April 25, 2012 14:44
-
-
Save ten1seven/2490271 to your computer and use it in GitHub Desktop.
JavaScript Namespace
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
var JS = JS || {}; | |
JS.Global = (function(window,document,undefined) { | |
'use strict'; | |
var private_var; | |
function private_method() { | |
// do stuff here | |
}; | |
var Self = { | |
'method_1': function() { | |
// do stuff here | |
}, | |
'method_2': function() { | |
// do stuff here | |
} | |
}; | |
return Self; | |
})(this,this.document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment