How to call a function via string within a class?
$.fn.myApp = function (options){
function myFunc(){
//do something
}
window["myFunc"](); //not working
$.fn.myApp["myFunc"](); //not working
}
Take a look at this code: you need to expose the method in order to call it form outside that function: http://jsbin.com/aXuloFE/1/
()to execute the function, ex.window['alert']('hi');.