getContext is not a function

Your value: is a jQuery object, not a pure Canvas element. To turn it back so you can call getContext(), call this.element.get(0), or better yet store the real element and not the jQuery object: See running code at http://jsfiddle.net/alnitak/zbaMh/, ideally using the Chrome Javascript Console so you can see the resulting object in the debug … Read more

jquery – return value using ajax result on success

The trouble is that you can not return a value from an asynchronous call, like an AJAX request, and expect it to work. The reason is that the code waiting for the response has already executed by the time the response is received. The solution to this problem is to run the necessary code inside … Read more