Suppose I have a box in my page:
<div id="test" style="width:200px; height:200px; background:yellow">
this is a test
</div>
I just include "jquery-1.6.2.min.js" in my page
then I want change the font size, so I use
$('#test').animate({ fontSize: "10em"}, "slow");
then I want change the background-color
of the "test" box
I write:
$('#test').animate({ 'background-color': '#000000' }, "slow");
but until I include "jquery-ui-1.8.5.custom.min.js" it doesn't work.
I think the orginal "jquery-1.6.2.min.js" file already include the all animate function, fontsize and background color are both css attributes,but the original could only support fontsize change? Why?
My question is that I think the package "jquery-ui-1.8.5.custom.min.js" is just used for UI or some other things. Both for css attribute changing.
http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor/190571#190571 – Simon Arnold Oct 18 '11 at 13:52