0

I have two divs with the same class, I'd like to animate them to a different color at the same time, but when I do this one animates and finishes, and only then does the other change. Is there a way to make them do this at the same time? Right now I'm doing it like so:

  $('.menutxt').animate({color:"#333333"},400);
  $('#burlington_txt').animate({color:"#ffffff"},400); 

both have the class menutxt.

Thanks for any help I can get on this.

loriensleafs
  • 2,205
  • 9
  • 37
  • 71

1 Answers1

1

From this question, you can do something like this:

$(function () {
    $("#first").animate({
       width: '200px'
    }, { duration: 200, queue: false });
    $("#second").animate({
       width: '600px'
    }, { duration: 200, queue: false });
});

EDIT: For your code, it would be:

$('.menutxt').animate({
  color:"#333333"
}, {
  duration: 400,
  queue: false
});
$('#burlington_txt').animate({
  color:"#ffffff"
}, {
  duration: 400,
  queue: false
});
Community
  • 1
  • 1
rtcherry
  • 4,840
  • 22
  • 27