title: TypeError: $ is undefined in jquery
body: <p>I'm trying to use the "tabcordion" library in jquery on a Wordpress based website. The tabcordion javascript file is being 'enqueued' and appearing after the jquery file (so that bit looks ok).</p>
  
  <p>The start of the jquery code is:</p>
  
  <pre><code>(function($) {
   var Tabcordion;
  
   $.fn.tabcordion = function(option) {
     return this.each(function() {
      var $this, data, options;
      $this = $(this);
      // rest of code ....
  </code></pre>
  
  <p>When I load my page I get the error "TypeError: $ is undefined" in Firebug</p>
  
  <p>After a bit of googling I changed all the $. into jQuery.</p>
  
  <p>That sorts some of the issues out but I then get an error about the line:</p>
  
  <pre><code> $this = $(this);
  </code></pre>
  
  <p>I'm assuming that I don't have $ defined for jquery. I tried adding a line at the top of the function:</p>
  
  <pre><code>$ = jQuery;
  </code></pre>
  
  <p>but that didn't work.</p>
  
  <p>Any ideas how I can get the $ to behave?</p>
  
  <p>I have another script that works that is enclosed by:</p>
  
  <pre><code>(function($){ jQuery(document).ready(function($){
      // code in here
  }); })(jQuery);
  </code></pre>
  
  <p>But the end of tabcordion has:</p>
  
  <pre><code>(function($) {
    // tabcordion code....
  }).call(this);
  </code></pre>
  
  <p>And the "call(this)" bit is throwing me?</p>
  
  <p>Any ideas?</p>