title: HTML5 canvas jQuery getContext on classes
body: <p><strong>This code works:</strong></p>
  
  <pre><code>&lt;canvas id="myCanvas" width="578" height="200"&gt;&lt;/canvas&gt;
      &lt;script&gt;
        var canvas = document.getElementById('myCanvas');
        var context = canvas.getContext('2d');
  
        context.beginPath();
        context.moveTo(0, 200);
        context.lineTo(578, 0);
        context.stroke();
  
        context.beginPath();
        context.moveTo(0, 0);
        context.lineTo(578, 200);
        context.stroke();
      &lt;/script&gt;
  </code></pre>
  
  <p><strong>I tried to do the same in jQuery and that did not work:</strong></p>
  
  <p>"<em>Object [object Object] has no method 'getContext'</em>"</p>
  
  <pre><code>var context = $('.dropzone').getContext('2d');
  context.beginPath();
  context.moveTo(0, 200);
  context.lineTo(578, 0);
  context.stroke();
  
  context.beginPath();
  context.moveTo(0, 0);
  context.lineTo(578, 200);
  context.stroke();
  </code></pre>
  
  <p><strong>I even read on stackoverflow that I should try this (that did not work)</strong></p>
  
  <p>Added a <strong>[0]</strong> to the code.</p>
  
  <p>"<em>Object #&lt;HTMLDivElement&gt; has no method 'getContext'</em>"</p>
  
  <pre><code>var context = $('.dropzone')[0].getContext('2d');
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>I want to "paint" in every .dropzone. Is that not possible? How?</p>