title: Canvas to data url not working
body: <pre><code>   &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/html2canvas.js"&gt;&lt;/script&gt;
      &lt;script src="js/canvas2image.js"&gt;&lt;/script&gt;
  
      &lt;script&gt;
      function mypng(){ 
      var c=document.getElementById("picture");
      var dataURL = c.toDataURL("image/png");
      alert(dataURL);
      }
      &lt;/script&gt;
  
  
      &lt;a id="jpeg" href="#" onclick="mypng();"&gt;
  
    &lt;canvas id="picture"&gt;&lt;/canvas&gt;
  </code></pre>
  
  <p>but nothing happens, not run the function.</p>
  
  <p>of course I am generating an image on the canvas. If I right click the image and select view this image I can see correctly and encoded in base64 url</p>