Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #431486 Score: 0
    Profile photo of Neil Scott
    Neil Scott
    Member
    beginner
    intermediate
    curious george
    wise owl
    @nscott8678

    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.

    #431510 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    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.

    #431530 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    I’m sure this can be done way more elegantly but see if this is what you are looking for as your first request.

    Attachments:
    1. isLeft.zip
    #431534 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    53 pts
    @wheels

    Here is “another” example with a Hotspot question that will work in Lectora or Lectora Online.

    Attachments:
    1. 123.pkg
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.