Does anyone know how I can expand on the function at the moment, so that when one navigation is open, when the user clicks to open the other navigation, the navigation which is open presently collapses?
Please find the code below;
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.
What you’re currently doing is toggling the display of all elements with the
subclass, so clicking on any link will display all of the sub menus. Instead, you want to hide all of the elements with the classsubthat aren’t a sibling of the link being clicked on, and then toggle only the element with the classsubthat is a sibling of the link being clicked on.Updated jsFiddle