Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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