Replies: 1 comment 7 replies
-
I don't think there is an easy way. Here is a quick and dirty script as an example: include-after-body:
- text: |
<script type="text/javascript">
var elements = document.querySelectorAll('[aria-label]');
for (var i = 0; i < elements.length; i++) {
var ariaLabel = elements[i].getAttribute('aria-label');
elements[i].setAttribute('data-bs-title', ariaLabel);
elements[i].setAttribute('data-bs-toggle', 'tooltip');
}
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script> |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
How do I add a tooltip to custom icons in the navbar?
I'm following the Quarto doc, adding a GitHub icon into the navbar:
(From: https://quarto.org/docs/reference/projects/websites.html#nav-items)
But if I hover my mouse cursor, no tooltip appears.
The tooltip I want is something that looks like this: when I hover the mouse cursor over the Downloads icon:
Beta Was this translation helpful? Give feedback.
All reactions