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

External links and rich text in menu items #85

Open
gitarmartin opened this issue Mar 18, 2022 · 1 comment
Open

External links and rich text in menu items #85

gitarmartin opened this issue Mar 18, 2022 · 1 comment

Comments

@gitarmartin
Copy link

gitarmartin commented Mar 18, 2022

Hi! We need tooltips and clickable links within the menu item headings, can this be achieved? Something like:

<li>This menu item will give a tutorial about <a href="https://www.youtube.com" class="special" title="Click link to visit Youtube">youtube</a></li>

There might be also rich text tooltips (generated by javascript something like tipped https://github.com/staaky/tipped) so there might be also class attributes involved.

Currently the problem is that the whole menu item is rendered as a link anchor <a...> is this necessary, maybe the list item could simply have a click listener instead and it would not bubble from link within the title itself?

@somewebmedia
Copy link
Owner

Do it like this:

<li class="data-nav-custom-content">
  <div>This menu item will give a tutorial about <a href="https://www.youtube.com" class="special" title="Click link to visit Youtube">youtube</a></div>
</li>

Don't forget that div wrapper, it won't work otherwise.

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

2 participants