I have a rather basic implementation of a jQuery Accordion on a page (using 1.3.2, jQuery UI Core 1.72 and jQuery UI Accordion 1.7.2), and I wish to open the 2nd section whe
proper way to open a specific tab:
$("#accordion").accordion({
collapsible : true,
active : false,
heightStyle : "content",
navigation : true
});
Set the option:
//$("#accordion").accordion('option', 'active' , "INSERT YOUR TAB INDEX HERE");
$("#accordion").accordion('option', 'active' , 1);
or you could work with a hash like this:
if(location.hash){
var tabIndex = parseInt(window.location.hash.substring(1));
$("#accordion").accordion('option', 'active' , tabIndex);
}
Vote if you use ;)
Thanks