Hi,
How can I create a global function in an AMD module, which can be called from outside the module?
E.g.
If my module was:
define(['jquery'], function($) {
return {
init: function(courseID) {
// DO some stuff
function my_global)function(){
alert('hello');
}
}
}
});
I could call my_global_function() from within that module, but not from another script, or by putting it into any onclick events. How can I make it global, so I can call it from elsewhere?