title: jQuery and $ questions
body: <p>I am modifying some code that has a lot of jQuery but I am not sure what some of the jQuery statements are doing.</p>
  
  <p>At the top of the jQuery code there is </p>
  
  <pre><code>jQuery.noConflict
  </code></pre>
  
  <p>*1. I understand that. But then there is a some code that has:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  (function($) {
  
  $(document).ready(function() {
  
      jQuery.fn.fixEmail = function() {
      {
     return $(this).each(function() {
         var $s = $(this);                  
             ...code...
          }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I get that jQuery is used because of the noConflict.  What's the parameter $? </p>
  
  <p>*2. In another function, they use </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(function(){
      var $ = jQuery;
      var cc = {
          mode : 'teaser',
          featureVisible : true,
          $loader : '&lt;p class="loadingAnimation"&gt;&lt;img height="32" src="' +
                  config.xoImgUrl +
                  '/images/ajax-loader.gif" width="32" /&gt;&lt;/p&gt;',
                  ....more code...
              }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>So they are setting $ to the jQuery from noConflict.  But why? Could they have just used jQuery?</p>
  
  <p>*3. There is a plugin that I want to use that is initialized by:</p>
  
  <pre><code>   var $j = jQuery.noConflict();
      var $ = {};
      $j(document).ready(function(){
          $j.history.init(pageload);
          $j("a[@rel='history']").click(function(){
              ...more code...
          });
      });
  </code></pre>
  
  <p>I understand what the noConflict does but what does <code>var $ = {}</code> do?</p>