title: kineticjs "cannot call method 'appendChild' of undefined"
body: <p>I am only starting to use kineticJS but I am getting some errors after following 
  <a href="http://www.html5canvastutorials.com/labs/html5-canvas-image-mouseover/" rel="nofollow">This</a> tutorial</p>
  
  <p>I don't understand why but I am getting an exception from inside the KineticJS file:</p>
  
  <p><code>"Uncaught TypeError: cannot call method 'appendChild' of undefined".</code></p>
  
  <p>When I do a step by step <code>alert()</code>s, I see that it stops after</p>
  
  <blockquote>
    <p>var stage = new Kinetic.Stage("rightSide", 578, 200);</p>
  </blockquote>
  
  <p>but I most definitively have:</p>
  
  <blockquote>
  <pre><code>&lt;canvas id="rightSide"&gt;
  &lt;/canvas&gt;
  </code></pre>
  </blockquote>
  
  <p>I also tried:</p>
  
  <blockquote>
  <pre><code>&lt;div id="rightSide"&gt;
  &lt;/div&gt;
  </code></pre>
  </blockquote>
  
  <p>and I am getting the same error.</p>
  
  <p>Thanks.</p>
  
  <p>Edit:
  in response to the comments below, this is Copy-Paste from the tutorial:</p>
  
  <blockquote>
  <pre><code>&lt;/head&gt;
  &lt;body&gt;
  &lt;div id="container"&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  </blockquote>