jQuery equivalent of getting the context of a Canvas

Try:

$("#canvas")[0].getContext('2d');

jQuery exposes the actual DOM element in numeric indexes, where you can perform normal JavaScript/DOM functions.

Leave a Comment