title: jQuery error: "$ is undefined"
body: <p>I'm using a enhanced version of Lightbox called SexyLightbox. It uses jQuery as its framework. When I initialize it, I get this error on regular invervals when the Lightbox isn't running and an infinite amount of times when I attempt to show a picture:</p>
  
  <p><pre><code>Error: $ is undefined
  Source File: <a href="http://bagelstreet.se/sexylightbox/sexylightbox.v2.3.jquery.min.js" rel="nofollow noreferrer">http://bagelstreet.se/sexylightbox/sexylightbox.v2.3.jquery.min.js</a>
  Line: 12</pre></code></p>
  
  <p>The initialization script goes as this:</p>
  
  <pre><code>
      &lt;link rel="stylesheet" href="sexylightbox/sexylightbox.css" type="text/css" media="all" />
  
      &lt;script type="text/javascript" src="sexylightbox/jquery.min.js">&lt;/script>
      &lt;script type="text/javascript" src="sexylightbox/jquery.easing.1.3.js">&lt;/script>
  
      &lt;script type="text/javascript" src="sexylightbox/sexylightbox.v2.3.jquery.min.js">&lt;/script>
  
      &lt;script type="text/javascript">
          $(document).ready(function(){
            SexyLightbox.initialize({color:'black', dir: 'sexyimages'});
          });
      &lt;/script>
  </code></pre>
  
  <p><b>UPDATE</b> So - I've replaced the library, I'm using the <em>unpacked</em> version of sexylightbox. FireBug points out the error on the jQuery.bind() function, specifally on the bolded line:</p>
  
  <pre><code>
  jQuery.bind = function(object, method){
    var args = Array.prototype.slice.call(arguments, 2);  
    return function() {
      <b>var args2 = [this].concat(args, $.makeArray( arguments ));  </b>
      return method.apply(object, args2);  
    };  
  };  
  </code></pre>
  
  <p>jQuery version being used is 1.3.2.</p>
  
  <p>Any thoughts on what might be happening?</p>
  
  <p><b>Solved</b></p>
  
  <p>Problem was a coding error on SexyLightbox author's code. Used $ on jQuery.bind() before $ is defined.</p>