Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Last active December 8, 2015 13:30
Show Gist options
  • Save RyanHirsch/f57206da6ce6eb38f5b7 to your computer and use it in GitHub Desktop.
Save RyanHirsch/f57206da6ce6eb38f5b7 to your computer and use it in GitHub Desktop.
Ember Hover binding
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement: function() {
var $this = this.$(),
$actions = Ember.$('.actions', $this);
$this.hover(function() {
$actions.slideDown();
}, function() {
$actions.slideUp();
});
},
willDestroyElement: function() {
this.$().off('mouseenter mouseleave');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment