I intend to make a browser game with jQuery, I would need a canvas object in which I can place many visual elements and animate them to some extend. Is this entirely possible with just jQuery? Some may point to HTML5 canvas but it’s specification isn’t complete so I’m not too fond of it.
Share
It’s very easy to make a canvas object with jQuery. Use
That creates an object of
HTMLCanvasElementwhich you can append to the page. jQuery is a JavaScript library, and to write a canvas based game, you need to code in JavaScript. There may be wrappers for jQuery available but I would recommend you use the right tool for the job instead of jQueryifying everything. Checkout these libraries: