Let\'s say I have something like this :
var MyApp = MyApp || {}; MyApp.feature = (function($){ var somelocalVariable, otherone init = function() {
Replace "window" with "this"
this[functionName]();