Sporadic problems animating background color in Safari 4

Sporadic problems animating background color in Safari 4


I'm having an issue where .animate with backgroundColor sometimes
works and sometimes doesn't in Safari 4. It always works in Mac/
Windows Firefox 3 and IE7 in my testing. On #jquery-ui, another user
said a similar problem occurred in Chrome.
I posted a simplified case at http://jsbin.com/okegi. When the page is
ready, the first div should turn black and then animate to red. If it
works in Safari 4, refresh the page and eventually the problem will
manifest itself. You can see a :30 screen clip of it working
sporadically in Safari 4 at http://files.getdropbox.com/u/172008/safari_jquery_animation_glitch.mov
I thought it might be an issue with the jQuery UI library not being
loaded (since the animation also doesn't occur if I leave out the
jQuery UI library), but the problem occurs even when I trigger the
animation manually well after the page has finished loading. This
problem still occurs when I use the jquery.color plugin instead of
jQuery UI, but it *never* happens when I animate a property that
jQuery can handle without UI or plugins (like width).
I'm not sure if this is a problem with jQuery UI, Safari (or WebKit),
or something in my code that I've missed. Thoughts?