The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Button – Fade in Fade out
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?
http://webapps.easy2.com/ce/ext1104/messages/iris_lock.html
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.
toggleClass('open');
Here’s a quick example: http://jsfiddle.net/senff/4dJW5/