I have this script I am using for a horizontal accordion. You can see the functionality here:
http://jsfiddle.net/vXpPg/
I am looking to have the open slide close on click as well.
Any help would be appreciated. Thank you!
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.
here you go:
http://jsfiddle.net/vXpPg/1/
I modified your
clickfunction to check the width of the section you are clicking on first. If this width is equal to what you wrote asmaxWidththen we know that we just want to collapse it (change its width to theminWidthsetting). If it is not, then we know it must be a small section, and need to expand like normal (the code you already had).