jQuery DataTables每列添加国家图标 [英] jQuery DataTables add country icons each column
问题描述
我想在,但我不知道如何使用它,而不用替换整列。
有人有答案?
使用 fnRowCallback
。
从数据表文档 http://datatables.net/release-datatables/examples/advanced_init/row_callback.html
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?
Use the fnRowCallback
.
Refer this example from the datatables documentation http://datatables.net/release-datatables/examples/advanced_init/row_callback.html
这篇关于jQuery DataTables每列添加国家图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!