The task is such that when you hover over an element to change its backgroundColor, after you move the mouse away, the old backgroundColor value should return.
$('td').hover( function(){ var a = $(this).prop('style'); $(this).css('backgroundColor', 'navy'); }, function(){ $(this).css('backgroundColor', a.backgroundColor); }); I do not return the same color. The variable is immediately written to the color that was changed.