The Zii component contains some UI components based on JQuery, which are defined in the package zii.widgets.jui, including CJuiAccordion, CJuiAutoComplete, CJuiDatePicker, etc. This article introduces CJuiAccordion, which displays an Accordion component (a UI component that can be folded like an accordion). This control encapsulates the JUI Accordion plug-in.
Basic usage is as follows:
$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;'),)); ?>
Define several foldable pages of Accordion by defining the panels attribute, and transmit parameters to the JUI Accordion plug-in by configuring options.
The above is the content of the PHP development framework Yii Framework tutorial (33) Zii component-Accordion example. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!