0

i have a div that it needs two effect that must implement one after another.i use delay() (in jquery) between two animation but it has not required result.indeed i wanna chain two keyframe.What is the proposed solution? thank a lot

aminkourosh
  • 45
  • 1
  • 4

2 Answers2

1

jQuery's animate() has a built in callback function:

$("#elementID").animate({top: 0}, 1000, function() {
    $(this).animate({top: 1000}, 1000);
});
adeneo
  • 312,895
  • 29
  • 395
  • 388
0

Webkit has an animation delay property, but that is only Webkit. I'd highly recommend using jQuery for your animations.

Check out this Stack Overflow question: http://stackoverflow.com/questions/7825509/css3-chain-animations

jQuery transit is also a nice plugin for using CSS3 animations, while using jQuery syntax. http://ricostacruz.com/jquery.transit/

Sean Thompson
  • 902
  • 1
  • 9
  • 19