Closed gregblass closed 9 years ago
Looks like someone has asked this already: https://github.com/rails/turbolinks/issues/507
And commited a solution here: https://github.com/rails/turbolinks/pull/509
What if there is no script tag though? My code is in application.js. And what about all the baked in bootstrap code? Popovers, Tooltips, Modals, etc...
My solution was to just place your code in a script tag with data-turbolinks-eval=always on the bottom of your application.html.erb, and remove the jQuery onready. Then any js in there is fired even when using back or forward.
After the user hits the back button, none of my JS is firing...all my bootstrap stuff, and also my mobile fly-out menu:
I have jquery.turbolinks set up correctly as far as I know.
Has anyone else experienced this?