The same has already been referenced here: https://github.com/rails/turbolinks/issues/539 but for bootstrap framework. The proposed solution does not work with foundation. Sorry if it is a foundation-rails gem issue. Any idea on how to fix that ? The only solution I found was to change the defaults generated by foundation in application.js as follows:
$(document).on('ready page:load', function () {
$(document).foundation();
});
This sounds like a foundation-rails issue. One of the requirements of Turbolinks is that scripts that would normally run on ready / DOMContentLoaded must now also listen for page:load events.
The same has already been referenced here: https://github.com/rails/turbolinks/issues/539 but for bootstrap framework. The proposed solution does not work with foundation. Sorry if it is a foundation-rails gem issue. Any idea on how to fix that ? The only solution I found was to change the defaults generated by foundation in application.js as follows:
Thank you.