2

I have the following animations:

$('#id').animate({'margin-top': 100, 'margin-left': 100}, {queue: false, duration: 1000});
$('#id2').fadeTo(1000, 1);

this seems to be queuing, how can i make sure that fadeTo() doesn't queue?

Hosh Sadiq
  • 1,484
  • 2
  • 21
  • 41
  • 1
    It is not queueing for me: http://jsfiddle.net/fkling/Z8Rs3/ Both animations are started at the same time. Or do you mean that *repeated* calling of these animations queue? – Felix Kling Jul 10 '11 at 11:59
  • suddenly seems to work fine :/ thanks anyway. – Hosh Sadiq Jul 10 '11 at 13:12

2 Answers2

8

Try:

$('#id2').stop().fadeTo(1000, 1);
Liam Bailey
  • 5,811
  • 3
  • 32
  • 46
-2

Move the opacity change into the animation.

$('#id').css({opacity:0}).show().animate({marginTop: 100, marginLeft: 100, opacity:1}, 1000);

http://jsfiddle.net/vcBPR/

sod
  • 3,694
  • 4
  • 20
  • 26