The Zii component contains some jquery-based UI components that are defined in the package Zii.widgets.jui, including Cjuiaccordion, Cjuiautocomplete,cjuidatepicker, and so on. This article describes cjuiaccordion, which displays a accordion component (similar to accordion-folding UI components). This control encapsulates the JUI accordion plug-in.
The basic usage is as follows:
<?php
$this->widget (' zii.widgets.jui.CJuiAccordion ', array ('
panels ' =>array (
' Panel 1 ' => ' Content for Panel 1 ',
' Panel 2 ' => ' content for panel 2 ',
' Panel 3 ' => $this->renderpartial (' _content1 ', null,true),
' Options ' =>array (
' collapsible ' =>true,
' active ' =>1,
),
' Htmloptions ' =>array (
' style ' => ' width:500px; '))
;
? >
By defining the Panels property to define several collapsible pages of the accordion, configure the options transfer parameters to the JUI accordion plug-in.
This example downloads: Http://www.imobilebbs.com/download/yii/JuiAccordionDemo.zip
See a full set of tutorials: http://www.bianceng.cn/webkf/PHP/201301/35265.htm