Last active
August 29, 2015 14:17
-
-
Save gregtyler/0f4a695997416dc8eeeb to your computer and use it in GitHub Desktop.
Potential definition template for UoE modules
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
/*** OLD ***/ | |
(function($){ | |
"use strict"; | |
// Define namespace | |
uoe.namespace_for_this_mod = {}; | |
// Define a function | |
function exampleFunctionIveCreated() { | |
alert( 'Please remove the exampleFunctionIveCreated function from your module.' ); | |
} | |
// Expose to global scope | |
uoe.namespace_for_this_mod.exampleFunctionIveCreated = exampleFunctionIveCreated; | |
})(uoe.$); | |
/*** NEW ***/ | |
(function(uoe){ | |
"use strict"; | |
// If using jQuery, require it inline as well. | |
// This won't load it twice, but ensures it's available | |
uoe.require('jquery1|jquery2',function(){ | |
// Local-scope jQuery | |
var $ = uoe.$; | |
// Define namespace | |
uoe.namespace_for_this_mod = {}; | |
// Define a function | |
function exampleFunctionIveCreated() { | |
alert( 'Please remove the exampleFunctionIveCreated function from your module.' ); | |
} | |
// Expose to global scope | |
uoe.namespace_for_this_mod.exampleFunctionIveCreated = exampleFunctionIveCreated; | |
}); | |
})(uoe); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment