I have the following JQuery code entered into a content editor web part which does some conditional formatting on the table cell of a list. The trouble with this is that it executes fine on document ready but when the user clicks a "next" image on the pagination area or clicks a column header to sort the list the page is not actually reloading so the formatting does not work. What is the best way to insure any click even on the list table would execute the formatting?
$(document).ready(function () {
$('tbody td.ms-vb2:contains("Green")').css("background-color", "green").css("color", "white");
$('tbody td.ms-vb2:contains("Yellow")').css("background-color", "Yellow").css("color", "Black");
$('tbody td.ms-vb2:contains("Red")').css("background-color", "Red").css("color", "White");
});