Updating cell class, when a cell is not visible due to the search filter

Updating cell class, when a cell is not visible due to the search filter

edoarslaedoarsla Posts: 7Questions: 1Answers: 0
edited November 2012 in DataTables 1.9
First, thank you for a great tool.

I am starting to use it more and more, but have ran into a problem. The data in my tables shows information that changes rather frequently. Sometimes I use color to display status (something is ON (green), or OFF (red)). For this I use a class.

If the cell/row is visible, I can change the class easily:
$("#status_XXX").addClass("srv_DOWN");

However, if you made a search that removed this row from visible rows, then I am not able to find this element.
I have not been able to find any similar discussions on this topic, and could certainly use a hand with this one.

Thank you!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Use the $ API function - http://datatables.net/api#$

    Allan
  • edoarslaedoarsla Posts: 7Questions: 1Answers: 0
    Thank you! Works perfectly.
This discussion has been closed.