1.1.2 • Published 2 years ago

javascript-tooltip v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Github.

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?

  1. npm i javascript-tooltip.

  2. add data-tooltip to whichever element you want to have tooltip.

  3. 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>

image

1.1.2

2 years ago

1.1.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago