1.3rc2: animate with duration of 0 and callback << bug

1.3rc2: animate with duration of 0 and callback << bug


1.3rc2: animate with duration of 0 and callback << bug
Something goes wrong in jQuery-1.3rc2.js with animate when duration is
0, and there is a callback. Is 0 an illegal duration? If not, there's
some bug in the jQuery code.
code:
$(document).ready(function(){
doFades([
{f: '#c0', s: 0},
{f: '#c1', s: 1000},
{f: '#c2', s: 1000}
]);
});
function doFades(fades) {
var fade;
console.log(fades);
if (fades.length === 0) { return; }
fade = fades.shift();
$(fade.f).animate({opacity: 0.1}, fade.s, false, function () {
console.log('faded', fade.f);
doFades(fades);
});
}
document:
<body>
<span id="c0">c0</span>
<span id="c1">c1</span>
<span id="c2">c2</span>
</body>
console log with jQuery 1.2.6 (which is what I'd expect):
[Object f=#c0 s=0, Object f=#c1 s=1000, Object f=#c2 s=1000]
faded #c0
[Object f=#c1 s=1000, Object f=#c2 s=1000]
faded #c1
[Object f=#c2 s=1000]
faded #c2
[]
console log with jQuery 1.3rc2 (somthing's wrong here):
[Object f=#c0 s=0, Object f=#c1 s=1000, Object f=#c2 s=1000]
faded #c0
[Object f=#c1 s=1000, Object f=#c2 s=1000]
faded #c0
[Object f=#c2 s=1000]
faded #c1
[]
faded #c2
[]
with jQuery 1.2.6 c0 fades quickly, then c1 slowly, then c2 slowly.
Which is what I'd expect.
with jQuery 1.3rc2 c0 fades instantly, then c1 & c2 together slowly.
Hope this helps. Marion