views:

120

answers:

1

Hi all,

I get the error message "Error: 'start.0' is null or not an object" while animating backgroundColor property of an element.

I included the color plugin and able to animate borderTopColor,color etc.

Html part:

<div id="divAnimation" style=""> hello </div>

Javascript Part:
$("#divAnimation").animate({ color: "red",
backgroundColor:"#123456",
borderTopColor:"black",
borderLeftColor:"green",
borderRightColor:"silver",
borderBottomColor:"yellow" }, "slow");

When i remove backgroundColor:"#123456", there is no problem.

Any idea? Thanks...

A: 

To do this, you'll need a plugin. I suggest: http://plugins.jquery.com/project/color

Nick Craver
hi again i used it indeed, i can animate border colors but having problem with backgroundColor. here a link for the above page if you are interested in with this also.but it is not important i guess you have other things to do. http://clients.entegral.com.tr/test/treeview.htm
mehmet6parmak
@mehmet6parmak - You need to give `#divAnimation` a default background color to fix this, it can't animate from transparent, something like `<div id="divAnimation" style="background-color: White;">`
Nick Craver