Hide mouse on canvas in Javascript

<!DOCTYPE html>
<html>
  <head>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.9.1.js'></script>
<style type='text/css'>
    canvas{border:1px solid red;}
</style>
<script type='text/javascript'>
$(window).load(function(){
     $("#theCanvas").click(function () {
         alert("You clicked the canvas with an invisible mouse!");
         $("#theCanvas").css("cursor", "none");
     });
}); 
</script>
  </head>

<body>
   <p">Click the red canvas and I'll hide the cursor when you are over me</p>
   <canvas id="theCanvas"></canvas>
</body>
</html>

Comments

Popular posts from this blog

Shutdown Computer With Funny Reason

Hidden Attribute in javascript

Draw animated loading spinner canvas in Javascript