Page jumps to the top when using "#" to activate a javascript

On my page I have a picture that I want to swap to another pic when clicking on a button.

I´m using the a href="#" to activate the javascript but that makes the page jump to the top. I know that I can write something like a href="javascript… but I can´t remember how to write it correctly.

Can someone help me please?

Tony Bolero