Forums

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

Home Forums JavaScript toggle hide/show div, and change image…help needed

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #177183
    matthisco
    Participant

    Hello,

    I’m trying to hide show my div using the code below, it works but i need to change the link image depending upon the display of the div, can anyone please help?

    http://codepen.io/matthisco/pen/plhLG

    #177187
    Paulie_D
    Member

    Link image…do you mean like a ‘status’ indicator?

    Like this –

    http://codepen.io/Paulie-D/pen/gqtKz/

    BTW…your Codepen doesn’t work because you didn’t link JQuery in the JS section. Click on the ‘cog’ and select Jquery from the list.

    #177193
    matthisco
    Participant

    Brilliant thanks very much

    #181382
    matthisco
    Participant

    Thanks very much for your reply.

    I can’t seem to toggle multiple divs at the same time. Is there a way to close the other divs before the current one is clicked?

    Many thanks

    #181387
    Paulie_D
    Member

    I can’t seem to toggle multiple divs at the same time.

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

    Will allow you to have multiple divs open.

    Is there a way to close the other divs before the current one is clicked?

    Yes, but it’s at odds with the previous option..unless I’ve missed something.

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