Consider the following javascript:
$(function(){
var private_function = function(){
alert("private_function!");
}
setTimeout("private_function();", 1000);
});
This yields the error “private_function is not defined”.
Is there a way to defer execution of a private / anonymous function in javascript without polluting the global namespace / exposing it via a global module?
Thanks for any suggestions.
OR