jeudi 8 janvier 2015

How do I run custom javascript after ember handlebars template has loaded?

I am trying to load Javascript that I inherited from the Zurb Foundation framework (CSS/UI bootstrap), specifically to handle "equalization" of cell heights in a grid. Their library is mostly CSS, which fits ember perfectly, but some of it requires Javascript to do what it does.


In my app, I have the router, routes, models, controllers, and templates. So far I don't have a view or component yet (nor do the docs make it super clear that they're what I should be using).


Is there a way in my controller/route/template to detect that a specific template has finished loading, and run some custom Javascript?


The custom Javascript I need to run:



$(document).foundation()

// OR, for speed's sake a more limited reload:
$(document).foundation('equalizer', 'reflow');




Aucun commentaire:

Enregistrer un commentaire