【发布时间】:2019-05-22 09:43:21
【问题描述】:
我在视图上创建了动态数据的表结构,但我想在不同的付款状态上添加不同的颜色,并且它们在每个付款状态上都有相同的类,但是当我点击第 1 或 2 或 3 页时,它只显示在单个页面不是在每个页面上。我想在所有页面上显示它。
$(document).ready(function() {
$('.paginate_button a').click(function() {
$.ajax({
url: "",
method: "POST",
data: $("#DataTables_Table_0 td .custom-text-badge"),
success: function(data) {
$("#DataTables_Table_0 td .custom-text-badge:contains('Success')").css({
"color": "red"
});
$("#DataTables_Table_0 td .custom-text-badge:contains('pending')").css({
"color": "green"
});
}
});
});
});
this is image link for payment success and pending text color
this image link for pagination
this image link when click on another page link 2/3 ect no color shown
【问题讨论】:
标签: jquery ajax datatables