ethan
(Ethan)
1
The following code does not work.
$this->widget('zii.widgets.jui.CJuiTabs', array(
'tabs'=>array(
'StaticTab 1'=>'Content for tab 1',
'StaticTab 2'=>array('content'=>'Content for tab 2', 'id'=>'tab2')
),
'options'=>array(
'load'=>'function(event, ui) { ... }',
),
));
ethan
(Ethan)
2
I know the answer now. It should be
$this->widget('zii.widgets.jui.CJuiTabs', array(
'tabs'=>array(
'StaticTab 1'=>'Content for tab 1',
'StaticTab 2'=>array('content'=>'Content for tab 2', 'id'=>'tab2')
),
'options'=>'js:{load:function(event, ui) { ... }}',
));
paskuale
(Pellicanipasquale)
3
Great liang how can change text.val() on tab’s click event ?
Thanks
paskuale
(Pellicanipasquale)
4
I test the code:
…
'options' => 'js:{load:function(event, ui) {
var $tabs = ui.tab;
alert(\'u have select tab=\'+$tabs);}}'
,
return me this alert:
[color="#808000"]u have select tab=http://127.0.0.1/sitename/index.php?r=tirger/view&id=7#6[/color]
I’m interested in the last number after the hash mark (6) how can retrieve it ? Explode string on # char, or there is a cleaner way ?
mdomba
(Maurizio Domba Cerin)
5
Check the value of
window.location.hash
but this gets the value of the current page URL