Using Bootstrap 2.0 I've styled a table using .table-striped. I'm updating rows of data via ajax and when the update is complete, I want to highlight the row, which works on rows that don't have a background-color. So basically, the even rows highlight, the odd rows don't. I'm not sure why that is.
I might just be too tired right now but some advice would be appreciated.
I'm using the following code to trigger the highlight:
$("#row_" + id).effect("highlight", {}, 1500);
Run the effect not on the row, but on the cells within the row. All the rows are highlighting, both even and odd. The changing background colour of the odd rows just gets hidden because the table cells' colour is over top.
Just to add to Pickle's answer that each cell within the row is above the row colour, see the code below for highlighting each cell instead:
$("#row_" + id +" td").effect("highlight", {}, 1500);
(this assumes that no cells are of type "th" on the row, but that can easily be added if required)
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