title: Why is the $ alias not working for this jQuery function
body: <pre><code>jQuery(document).ready(function($) {
      $('#customdivid').prepend($('&lt;div class="myclass"&gt;&lt;/div&gt;'));    
  })(jQuery);
  </code></pre>
  
  <p>I'm using Wordpress, and I understand that it runs in no conflict mode, but I thought if I wrote a function out as above I would be able to use $ instead of jQuery.</p>
  
  <p>Script runs fine when I just use jQuery, but I want to understand what I'm doing wrong.</p>
  
  <p>Thanks</p>
  
  <p>Update: I guess what I'm really asking is how can I create this in a js file. jQuery = $</p>
  
  <p>Would I just do <code>var $ = jQuery</code> </p>
  
  <p>I read somewhere that I can include <code>$</code> in the <code>()</code> after function and end the function with jQuery and all would be fine, hence my example above.</p>
  
  <p>Hope I'm making sense</p>
  
  <p>Thanks again!</p>