I have a question about CSS3. Is there an option to reset the animation after it finish (for example by using jQuery)?
Example: after button click, animation reset.
I have a question about CSS3. Is there an option to reset the animation after it finish (for example by using jQuery)?
Example: after button click, animation reset.
I found better solution:
$('something').removeClass('anim').animate({'nothing':null}, 1, function () {
$(this).addClass('anim');
});
It's working. Ofc it need a css class '.anim' with the animation.
This question is old, but i figured out a nice way to restart a css3 animation with jQuery while i was working on a project, and now i want to share. here is the trick:
$('#anim-div').replaceWith($('#anim-div'));
and this will restart the animation on '#anim-div', it works.