kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 195 forks source link

jQuery doesn't work after route change. #635

Open NvdB31 opened 8 years ago

NvdB31 commented 8 years ago

I use simple hrefs and Flowrouter.go() method to direct users to other pages. But after route changes, the jQuery DOM manipulations (like: $('element').text('New Text) do not fire. They just fire once on initial page load

These jQuery methods are all in my Template helper methods. If I reload the page everything works correctly, so it seems that templates are not re-rendered after route change. So my question is: How can I make sure that jQuery code (and other third party plugins that attach to DOM elements, for that matter) is executed with every route change?