Image Transition Effects with Canvas
I added a click event handler in the next function to the image in order to transform it to a CANVAS object and initiate the transition when you click on the image. The last function adds a live click event handler to the CANVAS so that you can keep clicking on the image and restarting the transition effect. It has to be live because the CANVAS object is not in the DOM when the page is loaded, it gets added when you initially press on the Image object. Check out the demo and look at the source to see the code.