The method that Zurb posted in the applications section of their website
isn’t firing off the JavaScript commands for many of the components that
they have available for developers.
Here’s the setup
application.html.erb
application.scss.css
/*= require foundation */ @import “foundation_and_overrides”;
application.js
//= require foundation
$(document).foundation();
I used the modernizr gem and installed it directly to support the
JavaScript.
Even so, with everything put in place. My drop-down buttons aren’t
working…Only for the top-bar which has no-turbo-link added to disable
it. (I can’t possibly add no-turbo-link to everything that I use.)
If you found out a way to solve this issue. Please, let me know. I’m
currently at a stand still and many of the Zurb features are completely
useless without the JS enabled.
The method that Zurb posted in the applications section of their website
isn’t firing off the JavaScript commands for many of the components that
they have available for developers.
I’d recommend you create a simple app/test case that illustrates the
problem and post a link to it.
I used the modernizr gem and installed it directly to support the
JavaScript.
Even so, with everything put in place. My drop-down buttons aren’t
working…Only for the top-bar which has no-turbo-link added to disable
them.
If you found out a way to solve this issue. Please, let me know. I’m
currently at a stand still and many of the Zurb features are completely
useless without the JS enabled.
Anything that is using the page load event to trigger setup will
generally fail in the presence of turbolinks. You can either disable
them entirely, or you can wrap your foundation() call in an observer on
the page:change synthetic event. In jQuery, that’s probably going to be
something like this:
$(document).on(‘page:change’, function(){
// your foundation methods here
});
Anything that is using the page load event to trigger setup will
generally fail in the presence of turbolinks. You can either disable
them entirely, or you can wrap your foundation() call in an observer on
the page:change synthetic event. In jQuery, that’s probably going to be
something like this:
$(document).on(‘page:change’, function(){
// your foundation methods here
});
Walter
Having to use this method every time is kind of a headache. I may just
try to disable turbolinks for Javascript all together.