I displayed img thumbnail on last column of databale
$.each(data,function(i,d){
d['index']=i+1;
url = url
d["ad_image"] = '<a href="#" ><img src="'+url+'" class="img-zoom" /></a>'
})
table = $('#datatable4').dataTable({
'paging': true,
'ordering': true,
'info': true,
"destroy": true,
"aaData" : data,
aoColumns: [
{ mData: 'index' },
{ mData: 'ad_title' },
{ mData: 'ad_details' },
{ mData: 'ad_image' },
]
});
img-zoom class css :
.img-zoom {
width: 310px;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
}
.transition {
-webkit-transform: scale(2);
-moz-transform: scale(2);
-o-transform: scale(2);
transform: scale(2);
}
But when I go to second page zoom image is not working... on the first page its working... how can I use fndrawcallback here?? or is there any other option??
$('.img-zoom').hover(function() {
$(this).addClass('transition');
}, function() {
$(this).removeClass('transition');
});