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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

back button text appended with every link name #29

Open
pearcemichal opened this issue Jan 27, 2020 · 0 comments
Open

back button text appended with every link name #29

pearcemichal opened this issue Jan 27, 2020 · 0 comments

Comments

@pearcemichal
Copy link

pearcemichal commented Jan 27, 2020

this is an odd issue, that I fully admit is because im trying to do something strange.

basically, I have a horizontal nav bar that I am converting into the mobile navbar, which is formatted as such:

<ul>
<li><a>Link 1</a>
<ul>
     <li><a>Sub Link 1</a>
     </li>
     <li><a>Sub Link 2</a>
     </li>
</ul>
</li>
</ul>

etc.

For the mobile view, I am trying to make it so that the entire navbar is nested under a single link. (so I can have other content in the tray)

the way I am trying to do that is to use the jQuery wrapAll function before calling SlideMenu, like so:

$("#navigation-first > ul").wrapAll("<ul id='mobile-tray-anchor'><li><a>Site Links</a> </li></ul>");

and while this does technically work, in that I get a single menu item at the top level:

image

When navigating into the menu, the text for the "Back" Link has been appended with the name of every single link in the nav menu

image

This doesnt happen if I just alter the html to include the enclosing UL tag, but then that messes up my desktop navigation menu.

Any ideas what could be causing this? Also, if you have any ideas of a better way of accomplishing this, I would be happy to hear that as well.

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