I’m a noob at query and trying to make one, obviously simple thing to happen. Here’s the jsfiddle that i made. As you see i have 3 buttons: Close (closes all open div’s) AZ and AR. When i click AZ it slides down, when i click AR (assume the AZ is still open) it slides AZ Up and Slides AR down so there’s only 1 div open at a time. However, if I click on opened div it slides Up and Slides Down again. What I want to do is when the div is open (i.e. slided Down) and I click on it it should not slideUp->Down again. In other words, if the div is open then nothing should happen when i click on it again as I have a Close button for that.
Thank you in advance.
this works for me
http://jsfiddle.net/wfUu5/4/
not saying it’s the ideal solution (the whole code could be written better), but it fixes your problem using your code