Forums

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

Home Forums JavaScript Hide element again

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

    Hi
    Please help me – here : http://codepen.io/MortenAndersen/collab/cBfIs
    I’m slideTooggle some div but I canĀ“t close the open div again?

    If I click nr. 1 I would like to close it again if I click it again

    #126568
    Paulie_D
    Member

    I think you may have hit the wrong Codepen ‘mode’ there.

    I’m not seeing any CSS or JS….

    #126570
    nordstromdesign
    Participant

    This line

    $(‘.arter-all > div’).hide();

    is causing your div#xx- to hide before it is toggled; therefore, when it is toggled it is only toggled on.

    Remove that line so that toggle can work the way you want it to.

    #126578
    Morten
    Participant

    @nordstromdesign
    If I remove that line all the div would be open at once …there must be only one at a time open


    @Paulie_D

    strange ???

    #126626
    Morten
    Participant

    @CrocoDillon

    Cool …this is working …. thanks :-)

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