hi
i want to put on tooltip in gridview
my code
protected/view/myshow/admin
<link rel="stylesheet" type="text/css" href="http://craigsworks.com/projects/qtip2/packages/latest/jquery.qtip.min.css" />
<script type="text/javascript" src="http://craigsworks.com/projects/qtip2/packages/latest/jquery.qtip.min.js"></script>
<script>
$(document).ready(function()
{
toolt_tip();
});
function toolt_tip(){
$('.tool_tip').each(function() {
$(this).qtip({
content:{
text: '456456',
ajax: {
// Use the rel attribute of each element for the url to load
url: $(this).attr('rel')
},
title: {
// Give the tooltip a title using each elements text
text: 'Ticket - ' + $(this).text(),
button: true
}
},
position: {
at: 'bottom center',
my: 'top center',
viewport: $(window),
effect: false
},
show: {
event: 'click',
solo: true
},
hide: 'unfocus',
style: {
classes: 'qtip-wiki qtip-light qtip-shadow'
}
})
})
.click(function(event) { event.preventDefault(); });
}
</script>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'alonavid-result-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
array('header'=>Yii::t('fieldName','ID'),
'class'=>'IndexColumn',),
'time',
array(
'name'=>'first',
'header'=>'first',
'type' => 'raw',
'value' => 'CHtml::link($data->getIdcoller1(),
CHtml::normalizeUrl("javascript:void(0)"),
array(
"id" => "'.rand(0,999999).'",
"rel" => "Viewamount?even_id={$data["id"]}&cdr_id= {$data["first"]}",
"class" => "tool_tip",
)
)',
),
array(
'name'=>'second',
'value'=>'$data->getIdcoller2()',
'htmlOptions'=>array('class'=>'sdf777')
),
array(
'class'=>'CButtonColumn',
'template'=>'',
),
),
)); ?>
and action in controller is right.
in first , tooltip is worked, but after update grid with ajax , tooltip not work !!
plz help me. thanks