I built an accordian menu using jquery. When you click one of the buttons it expands as it should. When you click it again (the same button), it closes and then expands again.

I want it to just close and not re-open again, unless you click it a third time. So, what jQuery command should I use? Do you have some sample code for me pleasE?