1.0.1 • Published 6 months ago

minimal-tooltip v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Tooltip

Minimal JavaScript tooltip with no dependencies

To use the library just add styles and JavaScript

<link rel="stylesheet" href="...tooltip.min.css">
<script src="...tooltip.min.js"></script>

Then you can use tooltips

<p>Lorem ipsum dolor sit amet, <span data-title="The tooltip content">TEXT WITH TOOLTIP</span>, quis nostrud.</p>

By default tooltip displayed at the top of hovered element, but you can change position by add placement option

<a data-title="Tooltip content" data-placement="top | right | bottom | left">Example text</a>

You also can add delay before tooltip will appear

<a data-title="Tooltip content" data-delay="3000">Example text</a>

Options

NameValuesDefaultDescription
contentAny stringN/AContent which will appear in the tooltip
placementtop, right, bottom, lefttopPlacement of the tooltip.
delayany positive number300Delay in milliseconds before the tooltip will appear.
1.0.1

6 months ago

1.0.0

6 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago