Toggler and Tooltip not working Rail 6 yarn webpacker

Generally foundation is running other javascript functions work (reveal, dropdown) but I cannot get (toggler or tooltip)

here are my settings:

  • Rails 6

  • Foundation 6.6.1

application.js:


import $ from ‘jquery’

import "foundation-sites"

import "@fortawesome/fontawesome-free/css/all.css";

require("src/application")

$(document).on('turbolinks:load', () => {
    $(document).foundation();
....

application.sccs:
@import ‘settings’;
@import ‘~foundation-sites/dist/css/foundation’;
@import ‘~motion-ui/motion-ui’;

I get this error trying to toggle a

Error: “The ‘toogler’ option containing the target class is required, got “””

Needed to add the data-anitmate attribute!!!

Hi,

You have to set the class that will be toggled using data-toggler.

See https://get.foundation/sites/docs/toggler.html