Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Update HTML5 canvas rectangle on hover
To update HTML5 canvas rectangle on hover, try to run the following code:
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
context.rect(20,20,150,100);
context.stroke();
$(canvas).hover(function(e){
context.fillStyle = blue;
context.fill();
}); Advertisements
