I am building a webpage and i have set a body
. Is there a way to change the url of the image when the user presses the mouse key, and change it back when the mouse key is released? Basically the change lasts the same amount of time as the click itself.
Also, how do i make sure this change works for a click anywhere on the page? Will adding an event listener to the body element suffice? Thanks in advance.