[jQuery] JS Question: How does this jQuery idiom work?

[jQuery] JS Question: How does this jQuery idiom work?


Plugins are supposed to use this:
(function($) {
// Plugin code
}) (jQuery)
I know what it does (allows the use of $ within the script), but how
does it actually work? Is it somehow casting the function object as
the jQuery object? It always seemed odd to me, and I haven't seen this
idiom elsewhere.