I have made simple example of using canvas and then I saw that my code doesn\'t work when I use jQuery selector.
Examples:
Javascript
This code...
var canvas = $('#myCanvas'); var ctx = canvas.getContext('2d');
Needs to be...
var canvas = $('#myCanvas'); var ctx = canvas[0].getContext('2d');