How can I add this kind of click-effect?

I succede with an pressed image effect with this simple code but the “pressed” image (image 2) continues being shown after a click. How can I make it repell back again emediately after the click?

export function button3_click ( event ) {
$w ( “#image61” ). hide ();
$w ( “#image62” ). show ();
}