Hi everybody,
I implemented CJuiAccordion for my side bar menu. I would like to keep the panel active opened when I refresh page for exemple or when I change it but I don’t get it. I read here : http://www.snyderplace.com/demos/accordion.html that there was a “cookieOptions” which was present but it seems that it doesn’t work… I tried to use this function (find here : http://jaaulde.com/test_bed/stickyaccordion/) too but doesn’t work :
active: ( $.cookies.get( cookieName ) || 0 ),
change: function( e, ui )
{
$.cookies.set( cookieName, $( this ).find( 'h3' ).index ( ui.newHeader[0] ) );
}
I use only ‘panels’ and ‘options’, here is my declaration cjuiaccordion options :
$this->widget('zii.widgets.jui.CJuiAccordion', array(
'panels'=>array(
...
),
'options'=>array(
'animated'=>'slide',
'autoHeight'=>false,
'cookieOptions'=>array('path'=>"/"),
'cookieName'=>'accordion',
'collapsible'=>true,
/*'active'=>'js:($.cookies.get(cookieName) || 0)',
'change'=>"js:function(e,ui)
{
$.cookies.set(cookieName,$( this ).find('h3').index(ui.newHeader[0]) );
}",*/
)
));