rstacruz / jquery.transit

Super-smooth CSS3 transformations and transitions for jQuery
http://ricostacruz.com/jquery.transit
7.3k stars 864 forks source link

Fix issue with child completions bubbling up to parent #157

Open tomhicks opened 10 years ago

tomhicks commented 10 years ago

When using transitionEnd, if you kick off a transition of a child and a parent and the child transition finishes before the parent, the event bubbles up and tells the parent to end prematurely.

By checking whether or not the event target is the current target, you can determine whether or not the event is occurring on the element you actually care about.