I have following JavaScript code:
var canvas = document.getElementsByTagName('canvas')[0];
var ctx = canvas.getContext('2d');
var img = new Image;
var x;
img.onload = function(){ ctx.drawImage(img,0,0); };
img.src='img.svg';
After execution of the above code I would like to select the SVG-image with jQuery. To do this I wrote following code $('svg')
, but this doesn't work.
Can somebody help me so that I can select the image?
Thank you very much for your help!