turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 428 forks source link

Navigation Drop-down does not work with foundation #635

Closed belgoros closed 9 years ago

belgoros commented 9 years ago

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();
});

Thank you.

Thibaut commented 9 years ago

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.