Such a classic problem, but with terrible time finding the actual cause. Usually, when I see this error, because the jQuery link after the code requiring it, or the jQuery backlink, or the jQuery conflict, etc., so far none of them look like this. Unfortunately, the search for a solution to this problem made me publish a post after such cases. Iβm sure that my problem here is equally simple, but Iβve been unlucky in an hour of hunting ...
Edit: Additional information ... The solution file (which I tried to recreate several times, trying to figure it out. It is a JavaScript template for the Windows Store Blank, and I do it in Visual Studio. The only link files are the Windows library for javascript 1.0, I tried to delete This is also for verification.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>HTML5 Canvas Template</title> <style> /* styles here */ </style> </head> <body> <canvas id="myCanvas" width="500" height="500"> <p>Canvas not supported.</p> </canvas> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var canvas = $("#myCanvas").get(0); var context = canvas.getContext("2d"); function renderContent() { // we'll do our drawing here... } renderContent(); }); </script> </body> </html>
javascript jquery html5 canvas
Rualstorge
source share