how can i open and close Jquery UI Accordian widget with external control (button/anchor).
how can i open and close Jquery UI Accordian widget with external control (button/anchor).
Share
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.
I figured it out by myself, as shown below.
Suppose this is your jquery UI according consisting of four accordians.
Now add external anchors with their different ID’s
Now add jquery code.
To add more accordions and anchor, simply add an new id to anchor and in jquery code will give its active parameter. active:0 means 1st accordion, active:1 means the second accordian and so on. this works for Jquery UI accordion.
Here is an example: http://jsfiddle.net/ZRBc6/1/