Created
March 16, 2015 23:11
-
-
Save pwfisher/29c2bac95482792a5b59 to your computer and use it in GitHub Desktop.
Ember.js "scroll-to-me" component (scrolls window to itself on didInsertElement)
This file contains hidden or 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 () { | |
Ember.$('html, body').animate({ scrollTop: this.$().offset().top }, '2000'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment