Reputation: 1074
I'm using this piece of code on jsfiddle ( http://jsfiddle.net/ErickPetru/65wSn/1/) which was posted in a previous question by me here: Slidetoggle with a close button - jQuery
My question is how can i adjust the jquery so that only one box is shown at one time?
Upvotes: 3
Views: 785
Reputation: 206121
Do you like this solution? JSFiddle DEMO
EDIT:
ups! we forgot to add: IF a popup is opened do not trigger any click functions! 'cause it's annoiyng! ;)
here is the new JSFiddle DEMO! (sorry for not fixing this in v0.01 ;D )
Upvotes: 2
Reputation: 6720
You can just hide them all when the button is clicked and then turn toggle the active one directly after they're all hidden.
Upvotes: 0