We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

How to change image icon by – on event click for element –

Home Forums Puzzles How to change image icon by – on event click for element –

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #52934
    kinikuman
    Customer

    <div><img src="icons/iconrotate.png" width="50" height="50" /></div>

    I would like to use html puzzle – on event of “click” element iconrotate and icons will change form iconrotate.png to iconrotategrey.png

    I try to use “set prop -src- ” but look like a make something wrong please help

    Attachments:
    You must be logged in to view attached files.
    #52939
    kdv
    Participant

    add id in <img> and change src for this id

    <div id="iconrotate"><img id="currentIcon" src=""/></div>

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #52950
    kinikuman
    Customer

    thank you so much that very helpful

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.