Forums

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

Home Forums CSS Button – Fade in Fade out

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39987
    kpiatak
    Member

    I have this set up so that when you click on the button 2 new images fade in.

    I would like to also have it, that when you click the phone again those two images fade out, how would I do this?

    #110680
    kpiatak
    Member
    #110687
    Senff
    Participant

    I’d suggest to give them both a class like “open” or “active” (so the default state is that the door is closed and the switch is to the left).

    Then the button could simply use a toggleClass('open'); to toggle it’s state.

    Here’s a quick example: http://jsfiddle.net/senff/4dJW5/

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