Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing nav JS controller? #27

Open
dtbaker opened this issue Feb 18, 2023 · 1 comment
Open

Missing nav JS controller? #27

dtbaker opened this issue Feb 18, 2023 · 1 comment

Comments

@dtbaker
Copy link

dtbaker commented Feb 18, 2023

Hello,

I used your kickoff template, nice 馃憤

Just noticed it might be missing the nav js controller, as the click->nav#toggleMenu touch->nav#toggleMenu doesn't work.

Cheers

@dtbaker
Copy link
Author

dtbaker commented Feb 18, 2023

I just added a nav_controller.js:

import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static targets = [ "menu" ]

  toggleMenu() {
    this.menuTarget.classList.toggle('hidden')
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant