
Untitled
By: a guest on
Aug 11th, 2012 | syntax:
None | size: 0.50 KB | hits: 5 | expires: Never
How can i manipulate dom in controller in emberjs?
carousel: function() {
var context = this.get('controller'),
self = this;
if(context.get('loading') === false) {
setTimeout(function() {
var width = self.$('#page_wrapper').width(),
num = self.$('.page').size();
self.$('#pages').width(width * num);
self.$('.page').width(width);
console.log([width, num]);
console.log(context.get('elements'));
}, 100);
}
}.observes('controller.loading')