Skip to content

Instantly share code, notes, and snippets.

@ppcano
Created July 18, 2012 14:48
Show Gist options
  • Save ppcano/3136634 to your computer and use it in GitHub Desktop.
Save ppcano/3136634 to your computer and use it in GitHub Desktop.
How to receive transitionEnd events on the view layer, which option is the most suitable?
App = Em.Application.create({
customEvents: {
webkitTransitionEnd: 'transitionEnd'
}
});
Em.View.extend({
transitionEnd: function(event) {
// write you APP logic. TransitionEnd will fire multiple times for each transitioned CSS property
},
});
Em.View.extend({
transitionEnd: function(event) {
// write you APP logic. TransitionEnd will fire multiple times for each transitioned CSS property
},
didInsertElement: function() {
this._super();
self.$().on('webkitTransitionEnd', function(event) {
self.transitionEnd(event);
});
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment