-
-
Notifications
You must be signed in to change notification settings - Fork 0
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Example "Two-level menu with toggle" not working #6
Comments
This sounds like a case of me copy pasting examples from the other projects and not actually checking to make sure they work. I'll double check all the examples to make sure they are accurate. |
@mandrasch I have a PR open with example fixes. I've tested them and it looks good. If you have time do you want to give them a try as well? I'm hoping this will resolve the issue (it was 100% the case that I just copy pasted the examples from the base project and never updated them for Bootstrap). This also was the case for the BS4 one as well, so we have 2 fixes coming out! |
Thanks very much! 👍 I'll have a look (today or within next few days) |
Just a quick notice: I created a repo for the examples of bs4, took the code from branch fix-examples Repo: https://github.com/mandrasch/accessible-menu-bootstrap-examples Implementation is (inline JS) https://github.com/mandrasch/accessible-menu-bootstrap-examples/blob/main/bs4-examples.njk Had to change some small things to get it working. I'll will post these here later. :-) |
Things I had to change (bootstrap 4):
const menu = new AccessibleMenuBootstrap4.Bootstrap4DisclosureMenu({ Changed the selector, it was set to menu: menuElement: document.querySelector("#main-nav .navbar-nav"),
const menu = new AccessibleMenuBootstrap4.Bootstrap4DisclosureMenu({
const menu = new AccessibleMenuBootstrap4.Bootstrap4Menubar({
<nav id="main-nav-single-level" aria-label="Main" class="navbar navbar-light bg-light"> |
Haven't had a chance to look at this yet- been super busy. I should have some free time tonight though. |
@mandrasch Updated the fix-examples branch with the all changes above (excluding 4 since that's just colour changes). Are you planning on keeping hose examples up? If so, we can link to them in the docs. |
@NickDJM Yes sure, I can keep this repo up. :) Just removed dropdown html icons as well. |
Examples have been updated and merged. |
Thanks very much for providing this as open source! 👍
Summary
I tried to setup the example Two-level menu with toggle in a Codepen, but I get
Error results from
.dom.link
:I already changed this line from docs
to
initialize it correctly.
I load the bootstrap css and the following js in codepen:
Live: Codepen Live
Editor: Codepen Editor
Is there something I missed? I'm not familiar with
dom.link
of elements?Thanks in advance!
The text was updated successfully, but these errors were encountered: