I was playing around with the jQuery .animate() function, and ended up trying to change the background-color of one of the divs depend
You can also animate the background color with jQuery, just not with the animate() method, as you have noticed, the css method will do.
Since this is a very easy thing, do not include another library to the code, spare yourself the http requests and just do it with plain JS.
This function will do just fine:
function changeBG(el,clr){
var elem = document.getElementById(el);
elem.style.transition = "background 1.0s linear 0s";
elem.style.background = clr;
}
Link to working example
http://codepen.io/damianocel/pen/wMKowa