I want to change the background image of a container using the animate of jQuery. I tried this but it doesn't work and there are no compilation errors:
$("#main-container").animate(
{"background-image": 'url("images/background2.png")'},2000);
I can do it with the css but I want the animate effect.
$("#main-container").css(
{"background-image": 'url("images/background2.png")'});
Any idea why this is happening?