We want to do some height-adjusting (similar to how we think Trello does it) with JQuery, by using
$(document).ready. For prototyping we just put a
<script> tag into the bottom of a handlebars template, with the JQuery code that starts the resizing logic.
I’m not that familiar yet with JS internals, so maybe it was a stupid idea to put this into the template - anyway, the result is that code in this
<script> tag is only executed if the page is refreshed. It is not executed if the page is reached via URL manipulation or router transition.
Obviously, creating a top-level view class for this template and using didInsertElement should work, but we would like to keep jQuery and Ember code separate. Is there another way? Or should in-template scripting actually work?