//color will change to yellow on hover //after hover it will come to white $("span").hover(function(){ $(this).css("background-color", "yellow"); }, function(){ $(this).css("background-color", "white"); });