Last active
December 8, 2015 13:30
-
-
Save RyanHirsch/f57206da6ce6eb38f5b7 to your computer and use it in GitHub Desktop.
Ember Hover binding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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