Forum Moderators: open
[pre](function() {var Dom = YAHOO.util.Dom;
var Event = YAHOO.util.Event;
var DDM = YAHOO.util.DragDropMgr;
...
})();[/pre]
Now i'm familiar with older Javascript and programming in general, but i don't quite understand what's the benefit of wrapping all the code inside a (function)(). Can someone please exlain.
Also, is there an online reference manual for Javascript that explains this type of functionality, namespaces etc? Something in a format similar to php.net's manual would be fantastic. Thanks!
I once asked the same question, and received a full explanation here [webmasterworld.com...]
HTH
-Gs