【发布时间】:2015-11-26 18:36:18
【问题描述】:
我正在尝试根据可以是红色/绿色的“状态”为行着色。 使用 dynatable 根据 JSON 数据生成表行。
问题是每当我从 dynatable 调用以下代码时,它总是被 dyntable.process(); 覆盖。
$('#mytable tr td').each(function() {
if ($(this).text() == 'Red') {
$(this).closest('tr').css('background-color', '#f00');
}
});
我的 index.php: http://pastie.org/10389654
我的 index.js: http://pastie.org/10389656
【问题讨论】:
标签: javascript php html html-table dynatable