I am using ember view, once the page loads i want to scroll down to the page.In view didInsertElement will call and make the page load to scroll down, here is my code
App.MessagesView = Ember.View.extend({
didInsertElement: function() {
this._super();
var $target = $('.chat-area .chat-list')
, height = 0;
if ($target) {
$target.each(function(i, items_list) {
$(items_list).find('li').each(function() {
console.log($(this).height());
height = height + parseInt($(this).height());
});
});
$target.animate({ scrollTop: height});
}
}
I am using ember view, once the page loads i wa