Is there a way to trap an onReady-style event in Ember.JS after the layout has finished changing and all new elements are in the DOM? I have a datepicker that I’d like to use in my ember.js application that requires that you call
$('.datepicker').datepicker();
once all elements that want to use the datepicker are on screen.
In my app, I dynamically create input text elements after the initial render and so I can’t just call this at the initial onReady have this executed against the new elements.
Is there a way to hook into this sort of event with Ember.js and call this at that time?
You need to override the didInsertElement event in your Ember.View ala
didInsertElement: function() { $('.datepicker').datepicker(); },