My goal is to add color to a div using the addClass
event and then have it fade in smoothly.
$("#box1").hover(
function () {
$("#box2").addClass("blue");
$("#box3").addClass("yellow");
},
function () {
$("#box2").removeClass("blue");
$("#box3").removeClass("yellow");
}
);
$("#box2").hover(
function () {
$("#box1").addClass("blue");
$("#box4").addClass("yellow");
},
function () {
$("#box1").removeClass("blue");
$("#box4").removeClass("yellow");
}
);