I have a problem when you press the red button the animation start and then if you click in blue button it doesn’t work but in double click it works
Here is JSFiddle
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The reason you are having the problem is because there is no shared state between the
openandclosebuttons. So when you click on theclosebutton and it closes the container,openstill thinks the container is still open, requiring two clicks to produce the desired behaviour.You could use the following code, although it doesn’t use toggle (new jsFiddle):