Hi there, No, there's no difference. They both have the exact same effect.
But there's a reason why plugin developers use enclosures of that kind. They do it to make sure they can use $ instead of jQuery even when the user is using jQuery.noConflict(). Perhaps you want to isolate your own variables within an anonymous function, but unless you're using jQuery.noConflict(), you don't actually need to do this at all. I hope that clears up any confusion... Diego 2008/7/3 jfine <[EMAIL PROTECTED]>: > > > On 3 Jul, 21:35, "Michael Geary" <[EMAIL PROTECTED]> wrote: > > Yes, either one will do exactly the same thing. It's purely a matter of > > taste. > > Thank you both for this. I think Michael right, but perhaps Diego > would like to response - he thinks there is a difference. > > Thank you also Michael for the semicolon warning. I'm now using js2- > mode.el with Emacs. It warns me about such errors. > > -- > Jonathan > -- Cheers, Diego A.