- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I alter the color of an HTML5 canvas element using jQuery?
To alter the color of an HTML5 canvas, use −
document.getElementById("ID").style.background = red;
You can also try the following −
var ctx = canvas.getContext('2d'); ctx.fillStyle = "#FF0000"; ctx.fill();
- How can I use the HTML5 canvas element in IE?
- How can I get the ID of an DOM element using jQuery?
- Can the HTML5 Canvas element be created from the Canvas constructor?
- How can I select an element by tag name using jQuery?
- How can I show and hide an HTML element using jQuery?
- How can I change the text color with jQuery?
- How can I select an element by its class name using jQuery?
- How can I select an element by its ID attribute using jQuery?
- How can I select an element by name with jQuery?
- How do I add a simple onClick event handler to an HTML5 canvas element?
- Change colour of an image drawn on an HTML5 canvas element.
- Measure text height on an HTML5 canvas element
- Print a HTML5 canvas element
- How can I select an element with multiple classes in jQuery?
- How can I set the content of an iframe without src using jQuery?