0

Possible Duplicate:
delay JQuery effects

Does anyone know how I can add a time delay of about 1 second to this script?

I want the modcontentplatinummore div that fadesIn to fade in about a second after modcontentplatinum fades out.

Thanks.

<script>
$(".modcontentplatinummore").hide();
$('.morebutton-platinum').click(function () {
    if ($('.modcontentplatinummore').is(":hidden")) {       
        $('.modcontentplatinum').fadeOut(500);
        $('.modcontentplatinummore').fadeIn(500);
    } else {
        $('.modcontentplatinummore').fadeOut(500);
        $('.modcontentplatinum').fadeIn(500);
    }
});
</script>
Community
  • 1
  • 1
Kevin Reeves
  • 65
  • 1
  • 1
  • 9

2 Answers2

2

Just use the delay method which adds a timeout to the animation queue.

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
0

We can add delay using the delay() in jquery please use this link http://api.jquery.com/delay/

Anoop P S
  • 754
  • 1
  • 12
  • 31