javascript - Hover at 1 image in mutil images of canvas -


i try writing demo using hover in canvas.

this problem:

- have 1 canvas , in have 2 images.

- want when hover in 1 of 2 images change (in case change color).

but when hover canvas change.my canvas have 1 id, dont know how this.

this hover:

 $("#after_image").hover(function() {         setfilter(red);     }, function() {         setfilter(grayscale);     }); 

this screen when not hover , hover: enter image description here

enter image description here

i follow tutorial @ here:

http://www.storminthecastle.com/2013/04/06/how-you-can-do-cool-image-effects-using-html5-canvas/

i dumper, please me!

thanks read. :)

that way it's supposed "#after_image" contains both of images. create new canvas elements additional images , should go once add hover events them.

could add class instead of id , use $(this)

good luck!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -