I have the following working code:
ctx = document.getElementById(\"canvas\").getContext(\'2d\');
Is there any way to re-write it to use
The script works before it finds "canvas"
$(document).ready(function() { ctx = $("#canvas"); });