rowInserted: function (event, data) {
if (data.record) {
if (condition1 == condition2) {
$('#div1').find(".jtable tbody tr").css("background", "#F5ECCE");
}
}
}
the above code could be changing all row color, can i specify row number?
Use :eq() selector like,
rowInserted: function (event, data) {
if (data.record) {
if (condition1 == condition2) {
$('#div1').find(".jtable tbody tr:eq(1)").css("background", "#F5ECCE");
// changing first row background color
}
}
}
Updated you can set index dynamically like
$('#div1').find(".jtable tbody tr:eq("+index+")").css("background", "#F5ECCE");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With