What I aim is that if when hovered, and if the cell is already active, the hovered TD will be black (for deactivation), and orange for if it's still inactive (for activation).
But with my code, every time I hover it on td, the color won't return on its previous background color. (Still orange or black even the mouse leaves) What event should I be using?
$("td").hover(function(){
var cell = $(this).html();
if(cell == "")
$(this).css( "background-color", "orange");
else
$(this).css( "background-color", "black");
});