Mouse down action
September 12, 2019 12:00 AM
I'm looking for a method to show an image only while the user holds their left mouse button down while clicking on a hotspot shape. Once they release the left mouse button, the image is hidden.
This is to simulate a button press that turns on a lamp while they hold the button in. Once the button is released, the lamp turns off.
Additionally, in a similar way, I want an image to show (and stay visible), but the use must hold the left mouse button down for 10 seconds before it appears.
Thanks in advance.
Discussion (3)
Something like this?
https://stackoverflow.com/questions/7353281/jquery-image-swap-for-mouse-over-and-mouse-down
Note: answer given is actually CSS, not JavasScript.
I'm sure this can be done way more elegantly but see if this is what you are looking for as your first request.
Here is "another" example with a Hotspot question that will work in Lectora or Lectora Online.
Discussions have been disabled for this post