Try:
$("#canvas")[0].getContext('2d');
jQuery exposes the actual DOM element in numeric indexes, where you can perform normal JavaScript/DOM functions.
More Related Contents:
- Get pixel color from canvas, on mousemove
- HTML5 responsive canvas: resizing the browser canvas draw disappear
- Javascript function to Rotate a base 64 image by X degrees and return new base64
- JavaScript runtime error: ‘$’ is undefined
- canvas- Cropping images in different shapes
- Capture HTML Canvas as gif/jpg/png/pdf?
- How can I get the data-id attribute?
- How to get numeric value from a prompt box? [duplicate]
- Zoom in on a point (using scale and translate)
- Submit multiple forms with one submit button
- How to load all the images from one of my folder into my web page, using Jquery/Javascript
- How to submit an HTML form without redirection
- How to display JavaScript variables in a HTML page without document.write
- How to make a link open multiple pages when clicked
- Is there a DOM event that fires when an HTML select element is closed?
- How do I remove tinyMCE and then re-add it?
- Text blinking jQuery
- How to resize html canvas element?
- How to ONLY trigger parent click event when a child is clicked
- Redirect automatically when selecting an item from a select drop-down list
- Iframe.readyState does not work in chrome
- How to pass variable value between different html pages in javascript
- How to save canvas animation as gif or webm?
- Attach a blob to an input of type file in a form
- collapse and expand tabs jquery / simple accordion
- Is there an equivalent of canvas’s toDataURL method for SVG? [closed]
- Combine two selectors with one jQuery object
- Pausing CSS animation with javascript and also jumping to a specific place in the animation
- fade effect using javascript no jquery?
- How can I calculate the difference between two times that are in 24 hour format?