views:

29

answers:

0

I have a problem with a jQuery Timer and animation, if I disable the animations ($.fx.off=0;) it works. Here is the code:

 var Count=10;
 $('body').everyTime(5000, 'countDown', function(){
  if (Counter<Count){
    $('.console').fadeOut('fast', function() {
      myArray.push(otherArray[Counter]);
      $('.console').html('<h3>'+myArray[Counter]+'</h3>');
      $('.console,').fadeIn('slow'); 
    });
    $('.console1').fadeOut('fast', function() {
     $('.console1').html('<h3>Left '+(Count-Counter)+'</h3>');
     $('.console1').fadeIn('slow');
    });
    Counter++;
  } else {
    $('body').stopTime('countDown');
    $('.console').append('<p>Finish</p>');
  });

With the animations turned on I get an extra cicle and an undefined shows on .console, maybe the way I'm animating it... Thanks for your help