Home

Awesome

Vanilla Javascript tooltip.

Vanilla Javascript tooltip. Accepts plain text and fancy HTML.

Demo

http://zoltantothcom.github.io/vanilla-js-tooltip

Settings

OptionTypeDefaultDescription
themestringdarkSelects one of the pre-defined tooltip styles - light or dark.
distnumber10Specifies the distance in pixels from trigger to tooltip.
delaynumber0Specifies how long the tooltip remains visible after the mouse leaves the trigger.

Example

HTML:

Lorem <span data-tooltip="<img src='//lorempixel.com/150/100/' />" data-position="right top">ipsum</span> dolor sit amet.

Javascript:

var tooltip = new Tooltip({
    theme: "dark",
    delay: 750
});

Browser support and dependencies

BrowserSupportDependencies
Chromeyes-
Firefoxyes-
Safariyes-
Operayes-
IEyes*-

* IE9 and up

License

Free. Unlicense.