How do I run a function after an Ember View is inserted into the DOM?
Here\'s my use-case: I\'d like to use jQuery UI sortable to allow sorting.
You need to fire whatever you want in the didInsertElement callback in your View:
didInsertElement
MyEmberApp.PostsIndexView = Ember.View.extend({ didInsertElement: function(){ // 'this' refers to the view's template element. this.$('table.has-datatable').DataTable(); } });