is there a shorter way to call a function from the sub-namespace in jQuery? -


i'm writing function inside : index.fragment.singleentry, expect call function of index.fragment.singleentry.edittitle. instead of writing complete namespace of function, there shorter way call it?

i'm calling: index.fragment.singleentry.edittitle.load();

inside: index.fragment.singleentry.load

thanks in advance.

jquery.namespace("index.fragment.singleentry");  index.fragment.singleentry.load=function(vasid) { //================================================== // init gui components tinymce.init({     mode : "textareas",     theme : "simple",     width: "500",     height: "300"     //elements : "editcontentta" }); initeditcontrol(vasid);  index.fragment.singleentry.edittitle.load(); updategui_content();  //=================================================== 

index.fragment.singleentry.load= (function(singleentry) {  return function(vasid) { //================================================== // init gui components tinymce.init({     mode : "textareas",     theme : "simple",     width: "500",     height: "300"     //elements : "editcontentta" }); initeditcontrol(vasid);  singleentry.edittitle.load(); updategui_content();  ...  })(index.fragment.singleentry) 

wrap code in closure make variables local. return function.

alternatively can call this.edittable.load() since this in singleentry.load singleentry


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -