title: Targeting a specific div with html2canvas
body: <p>I'm using Hertzen's html2canvas.js, and tried to adjust the example code so that it targets a specific div instead of the entire body of a document:</p>
  
  <pre><code>html2canvas(document.body, {
    onrendered: function(canvas) {
      document.body.appendChild(canvas);
    }
  });
  </code></pre>
  
  <p>A sample of what I'm trying to accomplish is here: <a href="https://jsfiddle.net/ununkg3a/" rel="nofollow">https://jsfiddle.net/ununkg3a/</a></p>
  
  <p>On clicking the "Save PNG" button, I want to append an image of the jQuery generated squares that I'm targeting in a specific div. In the code, it appears that it's appending something, but it doesn't have a height. When I try to set a height with the output, it still doesn't work as expected.</p>
  
  <p>Is it not possible to accomplish something like this? Whenever I change document.body to another element, the screenshot doesn't render anymore, although it does render when I change it back to document.body. Someone told me that I'd have to crop the image with js, but that seems a little hacky.</p>