Error in use : when defining a single property. When defining a single property, you should use ,
// For single property $("#selector").css("property", "value"); //Define multiple properties $("#anotherselector").css({ property1: value1, property2: value2, });
Decision
Use this
$("#div-one td").mouseover(function() { $("#div-two").css("background-color","yellow"); }).mouseout(function() { $("#div-two").css("background-color","white"); });
Or, if you want to continue to use the .on() method
$(document).on("hover", "#div-one td", function() { $("#div-two").css("background-color", "yellow"); }).on("mouseout", "#div-one td", function() { $("#div-two").css("background-color", "white"); });
Starx source share