Sometimes you want to include links in the tooltips and make them clickable. Since I did not found any good answer for bootstap 5 and took me some time to figure out I want to share it.
The default Bootstrap 5 tooltip initialization looks like this:
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
new bootstrap.Tooltip(tooltipTriggerEl);
How is it possible to keep the tooltip visible, while you hover over it (and dehover the original element)?
If you want to enable tooltip hovering, modify it to the following:
Don't forget to add
data-bs-html=trueto the element, if you want to include any HTML in the tooltip ;)