Cjuiaccordion

hii friends I want to know how to expand and collapse all in accordion using yii.Please help me

In yii documentation (available for download), there a link to the jquery accordion, where you can read :

The js code for what you need seems to be there.

http://jqueryui.com/demos/accordion/#collapsible

The API doc is rather clear… isn’t it: http://www.yiiframework.com/doc/api/1.1/CJuiAccordion

There’s even an example there. Here is it with some visual changes


$this->widget('zii.widgets.jui.CJuiAccordion', array(

    'panels'=>array(

        'panel 1'=>'content for panel 1',

        'panel 2'=>'content for panel 2',

        // panel 3 contains the content rendered by a partial view

        'panel 3'=>$this->renderPartial('_partial',null,true),

    ),

    // additional javascript options for the accordion plugin

    'options'=>array(

        //'animated'=>'bounceslide',

        'collapsible'=>true,

        'active'=>false,

        'autoHeight'=>false,

    ),

    'htmlOptions'=>array(

        // HTML options you may need

    ),

));

You can explore the options in the jQuery UI page, you’ll find the link in the API doc as well.

Hehe, forget my answer above, I haven’t read your question correctly, and I realized it from seb7’s post!

sorry guys actually my question was ,in yii i created an accordion with 10 panels,and above that accordion i will place two buttons like expand all,collapse all, for this i saw code in following link

but im feeling difficult while applying that logic in yii accordion.Sorry for my bad english