1

I'm new to jQuery. I'm using Animate.css and just want to add delay in the animation so I tried this:

$('#fadeInRight').delay(20000).addClass('animated fadeInRight');

Why is this not working?

k0pernikus
  • 60,309
  • 67
  • 216
  • 347

2 Answers2

3

Use setTimeout()

setTimeout(function(){$('#fadeInRight').addClass('animated fadeInRight')},20000);
Pranav C Balan
  • 113,687
  • 23
  • 165
  • 188
2

The github page states another way to add a delay, no jQuery needed:


#yourElement {
    -vendor-animation-duration: 3s;
    -vendor-animation-delay: 2s;
    -vendor-animation-iteration-count: infinite;

}

Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)


k0pernikus
  • 60,309
  • 67
  • 216
  • 347