You can use JavaScript to get reference to a canvas in HTML5 but if you are someone so much into jQuery then you can use the following method to get reference to canvas using jQuery.
Old School Way
var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d");
jQuery Way
var canvas = $("#myCanvas"); var context = canvas.get(0).getContext("2d");
Subscribe to our mailing list
Subscribe to our mailing list and receive a free udpates
Leave a Reply