Luca Frank Guarini
Luca Frank Guarini

Reputation: 1213

Jquery - Show a div after animation completed

How to show a div after that animation is completed?

This is my code, animation works but div doesn't appear…

<script type="text/javascript">
    jQuery(document).ready(function () {                        
  $('#container-single article').delay(2000).animate(
  {left: '-490'},
  {duration: 250,
   easing: 'easeOutQuad'
   } , function() {
   $('#close').css("display", "block");
  });
});
</script>

Thanks

Upvotes: 0

Views: 5022

Answers (1)

Greg
Greg

Reputation: 31378

As it could be a problem with an external force like your CSS or HTML markup Ive written this.

http://jsfiddle.net/zQWa8/1/

$(document).ready(function () {                        
  $('#container-single article').delay(2000).animate({
      left: '-490',
      easing: 'easeOutQuad'
  }, 500, function() {
      $('#close').css("display", "block");
  });
});

Upvotes: 3

Related Questions