large-tooltip
v0.0.3
Published
Create a selectable large tooltip on the web page
Downloads
6
Readme
large-tooltip
Create a selectable large tooltip on the web page
Installation
In HTML:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/index.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/index.min.css" />
Or if you are using Node.js:
npm install --save large-tooltip
import LargeTooltip from "large-tooltip";
Usage
<p id="hoverMe">Hover me!</p>
const largeTooltip = LargeTooltip.init();
const hoverMe = document.getElementById("hoverMe");
const p = document.createElement("p");
p.innerText = "This is the text in the tooltip!";
largeTooltip.addTooltip(p, hoverMe); // add `p` as a tooltip of `hoverMe`