Closed synth-pop closed 3 years ago
The short answer is yes. But you should wrap this "word" with span (or another HTML element like strong -or- b). Only change the selector.
<html>
<head>
<title>Tippy</title>
</head>
<body>
<p>Hello World <span>tooltip</span></p>
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
// With the above scripts loaded, you can call `tippy()` with a CSS
// selector and a `content` prop:
tippy('p span', {
content: 'My tooltip!',
});
</script>
</body>
</html>
I love tippy.js, but I'm trying to figure out how I can trigger a tooltip by hovering over or clicking on a word. Is this possible? Also, is it possible to trigger a tooltip when hovering over an image (like what you're doing with the Render and Plug-in icons on this page: https://atomiks.github.io/tippyjs/v6/all-props/)?