Using file-size plug-in for 2 or more datatables
Using file-size plug-in for 2 or more datatables

Hello Community,
I Have 2 or 3 or more datatables with a file size column.
And I have this column once at Target : 0, and another at targer : 1, or target : 2
(in case i don't really know the target number, how can i do to have this :
'columnDefs': [{ 'type': 'file-size', 'targets': THE NUMBER OF COLUMN WITH FILE SIZE HEADER }],
)
What can I do to avoid repeating the same javascript code
$('#datatable').dataTable({})
for each table ??
I'm trying this --> http://jsfiddle.net/v07uxf35/3/
But sorting is not working, can any one tell me why please ?
Thanks