Question

I am using jQuery accordion as step by step wizard to enter user information.


-> Account Information


-> Personal Information


-> Additional Info


When user clicks next button in "Account Info", "Personal Info" div must open. What I am currently doing is, destroying the accordion and recreating it.

$("#Accordion").destroy().accordion({active: "#Personal", collapsible:true, autoHeight: false, header: "> div > h3"});

Is there a way to activate "personal information" without recreating the accordion?

Many Thanks!

Was it helpful?

Solution

Use the option setter method:

$( ".selector" ).accordion( "option", "active", 2 ); 

Check documentation for more details: api.jqueryui.com/accordion/#option-active

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top