Guys, I want to put a google’s map in a tab in my application and I need to deal with some events. From Yii’s documentation we can know that if we want to use the events from jQuery Tabs we can use clientEvents property to add all the events we need… The problem is that nothing works except the click event…
If I can use the events from here api.jqueryui.com/tabs/#event-activate, why does tabsactivate event is not working?
ps1: I am following this doc www.yiiframework.com/doc-2.0/yii-jui-tabs.html
ps2: This is my code where I want to put the event on
<?php
echo Tabs::widget([
'clientEvents' => [
'tabsactivate' => 'function( event, ui ) { alert("tabsactivate") }',
],
'items' => [
[
'label' => Yii::t('app', 'First tab1'),
'content' => '<br /> First tab content',
'active' => true,
],
[
'label' => Yii::t('app', 'Map tab'),
'content' => '<br />' . $this->render('../common/_google_maps', [
'lat' => $model->lat,
'lng' => $model->lng,
'name' => $model->name,
]),
],
],
]);
?>