This code works:
That is because you are using class in jquery.
Change this
var context = $('.dropzone').getContext('2d');
to
var context = $('#dropzone').getContext('2d');