Created
August 28, 2020 12:29
-
-
Save reachkamrul/1d4fb9c9584001ccf85bc9e227850208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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