title: javascript canvas detect click on shape
body: <p>I have a problem with the click function in javascript. This is my code:</p>
  
  <pre><code>var canvas = document.getElementsByTagName("canvas")[0];
  var ctx = canvas.getContext('2d');
  
  BigCircle = function(x, y, color, circleSize) {
      ctx.shadowBlur = 10;
      ctx.shadowColor = color;
      ctx.beginPath();
      ctx.arc(x, y, circleSize, 0, Math.PI * 2, true);
      ctx.fill();
      ctx.closePath();
  };
  
  var bigGreen = new BigCircle(1580, 800, '#5eb62b', 180);
  
  function init() {
      $("#bigGreen").click(function(e){
      alert("test");              
      });
  }
  $(document).ready(function() {
      init();
  });
  </code></pre>
  
  <p>But the click event is not working! Does anybody know why? Thank you so much in advance!</p>