Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Created August 28, 2020 12:29
Show Gist options
  • Save reachkamrul/1d4fb9c9584001ccf85bc9e227850208 to your computer and use it in GitHub Desktop.
Save reachkamrul/1d4fb9c9584001ccf85bc9e227850208 to your computer and use it in GitHub Desktop.
function imageTransformation(){
$table.find('tbody .my_image').each(function(){
var myImage = $(this).text();
if (myImage.match(',')){
var imageArray = myImage.split(',');
for ( var i = 0; i<imageArray.length; i++){
imageArray[i] = "<img src='"+imageArray[i]+"'>";
}
$(this).html(imageArray);
}
else{
$(this).html("<img src='"+myImage+"'>");
}
})
}
imageTransformation();
$table.on('after.ft.filtering', function() {
imageTransformation();
});
$table.on('after.ft.paging', function() {
imageTransformation();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment