Created
August 4, 2021 09:36
-
-
Save reachkamrul/ddeea74bf75e0661d0235eeb221ce86d 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
var columnKey = "mileage"; //Give your column key here | |
function runAll (){ | |
$table.on('ninja_table_all_chunk_loaded', () => { | |
setTimeout( | |
function() | |
{ | |
$('tbody .ninja_clmn_nm_'+columnKey).each(function(){ | |
$(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") ); | |
}); | |
}, 1000); | |
}) | |
} | |
runAll(); | |
$table.on('after.ft.filtering', function() { | |
runAll(); | |
}); | |
$table.on('after.ft.paging', function() { | |
runAll(); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment