I would like to show/hide a Div in my page, whenever I click on a button ON MY CMenu. I tried so many solutions and nothing works for me. I am still a beginner in Yii
Please tell me the best way to do this in yii.
this my div that I want to show and hide
<div id="myContent"> balabalabala </div>
and this is my Item in my Cmenu:
<?php $this->widget('zii.widgets.CMenu',array(
'htmlOptions'=>array('class'=>'nav'),
'submenuHtmlOptions'=>array('class'=>'dropdown-menu'),
'itemCssClass'=>'item-test',
'encodeLabel'=>false,
'items'=>array(
array('label'=>'Rechercher <img src="'.Yii::app()->theme->baseUrl.'/img/icons/ic_action_search.png" style="margin-top: -8px;" />','url'=>('#')),
I found this solution but for a link not a CMenu Item
Yii::app()->clientScript->registerScript('showGenre', ""."$('css_genre_class').click(function(){".
"$('#myContent').toggle();".
"});".
"");
How can I integrate it in my Cmenu !!
appreciate any help