I added the dynamic content of one column ...
for (var i = 0; i < data.length; i++) {
data.referred_by='<a href="#" data-toggle="popover" class="" title="'+temp[i].referred_by+'"data-trigger="hover" data-content="Total Referrals :'+temp[i].as_count+'">'+temp[i].referred_by+'</a>'
}
and the following code is creating a datatable
$('#datatable4').dataTable({
'paging': true,
'ordering': true,
'info': true,
"aaData" : data,
aoColumns: [
{ mData: 'index' },
{ mData: 'patient_name' },
{ mData: 'age' },
{ mData: 'gender' },
{ mData: 'mobile_no' },
{ mData: 'email_id' },
{ mData: 'request_status' },
{ mData: 'referred_by' },
{ mData: 'ref_to_img'},
{ mData: 'ref_by_img'}
]
and in the finished function I added
$('[data-toggle="popover"]').popover();
but in datatable only on the first page popover on hover works ... and on the second page it doesn't work ... is there any solution for this?
source
share