title: Image Click Event in HTML5 Canvas
body: <p>I have a HTML5 canvas and I have added an image in it and I want to call click event of image but event doesn't fire. I am writing a html code and some code of jqmobile</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script src="jquery-1.10.2.min.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.mobile-1.2.1.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.mobile-1.2.1.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;canvas id="canvas1" style="position: absolute; left: 0px; top: 0px;" width="1280" height="960"&gt;This text is displayed if your browser does not shown.
      &lt;/canvas&gt;
      &lt;script&gt;
          $(function () {
  
              var ctx = document.getElementById("canvas1").getContext("2d");
              var imgBasket = new Image();
              imgBasket.id = "imgBasket";
              imgBasket.src = "Basket.png";
              ctx.drawImage(imgBasket, 580, 260, 200, 200);
  
  
              //this jquery mobile event not working in canvas
              $("document").on("vclick", "#imgBasket", function () {
                  alert("Hello");
              });
          });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>