i have an ember view with a bunch of jquery code to manipulate the dom, the thing is when i use:
this.transitionTo("forecast.workpage", id);
it only loads the view once but when i try click it again the view doesn't execute again, i try several ways for instance adding this.rerender() in the end of my didInsertElement like that:
didInsertElement : function(){
//all my js code
this.rerender()
}
but it trows an error
Uncaught TypeError: Cannot read property '0' of undefined
, try adding this._super() in the begin, same result, is there a way to force the view to refresh from the view itself or the route? or controller ?
edit: try this approach with no results...
didInsertElement : function(){
this._super();
Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent);
},
afterRenderEvent: function(){
//$(document).foundation();
$(".sortables li:even").find('div.row').addClass("gray");
}
Same thing, executes onces but where i click on the action doesn't execute the code.