blivesta / animsition

A simple and easy jQuery plugin for CSS animated page transitions.
http://git.blivesta.com/animsition
MIT License
3.83k stars 783 forks source link

IN animation stopped if another animation ends before the animsition-in-duration #148

Open stefanoberetta opened 6 years ago

stefanoberetta commented 6 years ago

I'm using this beautiful plugin with animate.css (for some other animations). When animsition,js listen for the animationend in the $.fn.animateCallback the animation is stopped even if it's a children to end another animation. I edited the row where you bind the animationend (inside the $.fn.animateCallback):

$this.on(end, function (evt) {
 if (evt.originalEvent.animationName === cls) {
  $this.off(end);
   return callback.call(this);
  }
 });

where cls is the class assigned to the animsition container (it has to be passed everytime the methos is called)

Best regards S

tiagomv94 commented 5 years ago

nice, thank you very much! @stefanoberetta