问题
Well I am using jQuery accordion. Below is what I have
$(document).ready(function(){
$("#accordion001").accordion({
collapsible: true,
autoHeight: false,
navigation: true
});
});
The problem is that it always shows the first link data by default.
+++++++++++++++++++++++++++++++++++++++
+ Link 1 +
+ Link 1 line 1 +
+ Link 1 line 2 +
+ Link 1 line 3 +
+ Link 2 +
+ Link 3 +
+ Link 4 +
+++++++++++++++++++++++++++++++++++++++
I don't want to show first link data. I just want to show all available links as below.
+++++++++++++++++++++++++++++++++++++++
+ Link 1 +
+ Link 2 +
+ Link 3 +
+ Link 4 +
+++++++++++++++++++++++++++++++++++++++
Is it doable? What option do I need to write?
回答1:
$("#accordion001").accordion({
collapsible: true,
autoHeight: false,
navigation: true,
active:false,
});
this should work.
回答2:
$( "#accordion001" ).accordion( "option", "active", 2 );
and it will be opened in load time.
来源:https://stackoverflow.com/questions/12621550/accordion-dont-want-to-make-first-cell-active