Can you put this up online so we can debug ?
-- Ariel Flesler http://flesler.blogspot.com On Jan 14, 6:02 am, MarionNewlevant <marion.newlev...@gmail.com> wrote: > 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---