I have this code :
<script type="text/javascript" src="settings/jquery-1.5.min.js"></script>
<script type="text/javascript" src="settings/jquery.color.js"></script>
<script type="text/javascript">
function addTrack(param) {
$('.tracklistOff').find('.trackon').clone().insertAfter(($(param).parents('.trackon'))).animate({ backgroundColor: "#FCFCD8" },200);
}
</script>
but unfortunatly, when I call that function, I don’t get the animated-color effect!
Instead, I get cannot read property '0' of undefined error. If i swap backgroundColor with color it works. What’s happens?
Searching on google suggests that the color plugin is buggy and has issues on Safari/Chrome. You can try using jQuery UI’s implementation.
If you don’t want to use that, try to make sure you set something as the initial background color for your element.