I want to add in DataTables a country icon on each country
column (with jQuery) which is the same as the text that is displayed on that column.
So when it contains the country US then there is a image before the text that will link to us.png
.
So, from this:
to this:
(Edited in Chrome DevTools)
I think it can be done with aaData
, but I don't know how to use that without replacing the whole column.
Somebody has an answer?
I want to add in DataTables a country icon on each country
column (with jQuery) which is the same as the text that is displayed on that column.
So when it contains the country US then there is a image before the text that will link to us.png
.
So, from this:
to this:
(Edited in Chrome DevTools)
I think it can be done with aaData
, but I don't know how to use that without replacing the whole column.
Somebody has an answer?
Share Improve this question edited Sep 12, 2013 at 18:51 madth3 7,34412 gold badges52 silver badges74 bronze badges asked Apr 20, 2013 at 17:02 user1480019user14800191 Answer
Reset to default 5Use the fnRowCallback
.
Refer this example from the datatables documentation http://datatables/release-datatables/examples/advanced_init/row_callback.html