How do I check for a css value using jQuery?
- by zeckdude
After the user clicks on a table row, I want it to check if the table row's background-color is white, and if so, it will change the color to light blue.
The code I am using is not working. Here it is:
$("#tracker_table tr#master").click(function(){
if($(this).css("background-color") == "#FFFFFF") {
$(this).css("background-color", "#C2DAEF");
}
});
I think there is something wrong with my if statement. How do I check for a css value using jQuery?