> See if this helps:
>
> function Stuff() {
> // do stuff
> }
>
> var stuff1 = new Stuff(); // call the Stuff constructor
> var stuff2 = new Stuff; // parens are optional
Thanks, the "aha!" light just went on. It makes total sense now...I didn't know you could call a constructor without parens. It also makes sense that (function(){...})() might be a little more efficient since it's not creating an anonymous object in addition to the function itself, but I imagine that's pretty neglegable and that if you find the code more readable the other way, that's probably an acceptable trade-off.
Thanks to all who replied, it really cleared things up!
Todd
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/