need help with jquery ui accordion -


i have created accordion menu. here js code:

var menu = $('ul.menu', '#sidebar');  menu.accordion({     header: '.parent > a',     collapsible: true }); 

here recreation of have: http://jsfiddle.net/chmpt/

here's delima: want menu collapsed default , can't change html structure because menu produced joomla.

i tried using create method close active menu upon creation of accordion doesn't work right. , here's code:

var menu = $('ul.menu', '#sidebar');  menu.accordion({    create: function(event, ui) {         menu.accordion("activate" , false);     },     header: '.parent > a',     collapsible: true }); 

any suggestions?

its simple as

menu.accordion({     header:'.parent > a',     collapsible: true,     active:false }); 

edit: link jquery ui doc regarding active option


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -