Access HTML after this.render() in Iron Router
问题 I need to apply some Semantic UI on newly rendered templates, but I have no idea how to get the rendered HTML from the router. Here's my code : Router.route('/', { name: 'home', where: 'client', action: function () { this.render('home'); }, onAfterAction: function () { console.log( $('#homeSidebar') ); } }); Basically, $('#homeSidebar') should return the sidebar element, but it returns nothing as the HTML is not yet available. The only solution, so far, was to change the function like this