creating a button click effect - JQuery -


i wondering on how go recreating button pressed effect using jquery.

my ideas use event mouse click change image pressed image , after mouse releases, return original image. thoughts or ideas on ways accomplish this?

that should work. code be:

$("#button").mousedown(function(){ $("#img").attr("src", "img2.jpg"); }) $("#button").mouseup(function(){ $("#img").attr("src", "img1.jpg"); } 

hope helps!


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -