javascript-tooltip v1.1.2
What is javascript-tooltip?
Its a small tooltip library for javascript to help you get tooltip when you hover on text. its uses data attribute.
you can use this in any .js
file by just installing like other npm package.
How to use?
npm i javascript-tooltip
.add data-tooltip to whichever element you want to have tooltip.
make sure add content to that data-tooltip like this
data-tooltip="javascript tooltip"
.
Extra things
Spacing:
you can give padding / spacing to the tooltip by using data attribute data-spacing
and value can be any css number.
Example: data-spacing="12"
.
Positions:
you can specify where the first tooltip shows like top/left/bottom/right its a by default positions but u can give any direction.
but u have to use same keywords top|left|bottom|right as u can see u can give more than one by giving pipe sine (|).
Example: data-positions="top|right"
.
Full Example:
<h1
data-spacing="12"
data-positions="top|right"
data-tooltip="javascript tooltip"
>
which package is this
</h1>