jQuery authoring and closure
<p>I'm reading about writting <a href="http://docs.jquery.com/Plugins/Authoring" rel="nofollow">jQuery plugins</a> an there is a section that talks about preserving dollar sign notation so that it doesn't collide with other libraries that use it.  </p>

<p>It says:  </p>

<blockquote>
  <p>it's a best practice to pass jQuery to a self executing function
  (closure) that maps it to the dollar sign so it can't be overwritten
  by another library in the scope of its execution</p>
</blockquote>

<p>And here is how they do it: </p>

<pre><code>(function( $ ) {
  $.fn.myPlugin = function() {

    // Do your awesome plugin stuff here

  };
})( jQuery );
</code></pre>

<p>I'm trying to understand what they are saying and what this code is saying. How is the following code gets evaluated?  </p>

<p>Does <code>function($){}</code> get executed and get <code>jQuery</code> object passed to it? </p>

<p>Does jQuery object become the $?  </p>
