Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] Select/Deselect Single/Multiple Images with a Click

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #178745
    tahirk
    Participant

    I want to have an image quiz where users can select/deselect image(s).

    Currently, I have the issue i.e. users can only select/deselect if it is clicked on middle of the image (where CHECKED image is placed with opacity 0/1).

    In other words the click event is attached to CHECKED image, if I attach it to the selectable image than it won’t be selectable from middle (where the CHECKED image is hidden).

    I want it to be selectable by clicking on any part of the image and not just the checked icon image.

    Also, I would like the Next Step button to be hidden until an image is selected.

    Here is the pen.

    #178750
    Paulie_D
    Member

    Attach the click event to the wrapping anchor and adjust accordingly…

    #178754
    tahirk
    Participant

    Can you help me with the pen?

    #178755
    Paulie_D
    Member
    #178761
    Paulie_D
    Member

    Oh…and one with the ‘button thing’ you mentoned done.

    http://codepen.io/Paulie-D/pen/FsHbd?editors=001

    #178766
    tahirk
    Participant

    Amazing Paulie_D. Made my day.

    Exactly what I wanted. Thanks a lot.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.