title: jQuery get accessor
body: <p>I'm trying to get the canvas element in HTML. But, despite trying the tricks given here on stackoverflow and elsewhere I still run into this:</p>
  
  <pre><code>var obj = jQuery('#id')
  alert(obj[0])
  </code></pre>
  
  <p>This gives 'undefined', instead of the actual element. Alert(obj) gives 'Object' as expected. What am I doing wrong here? </p>
  
  <p>EDIT: I noticed that I had typoed the example, fixed that now. It still acts wrong. I was expecting obj[0] to give me the DOM element.</p>
  
  <p>EDIT2: Thanks for the comments, it lead me to my answer, which was wrong order of doing things. Had forgotten to use $(document).ready()...</p>