Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.
/ Tooltip Public archive

The simple tooltip plugin in pure JavaScript.

License

Notifications You must be signed in to change notification settings

fanich37/Tooltip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tooltip

Here's the Tooltip - - simple plugin in pure JS.

How to use

Include tooltip.min.js in your HTML markup and it's done. It takes all the elements on the page with the title attribute and tooltip it. If you need this plugin to work on certain elements you can use data-tooltip attribute and indicate it via simple API.

API

Tooltip has only several methods. Here they are:

Method Arguments Description
setOptions(args) object set some options to customise the appearance
reInit() - initialise the tooltip again (if it were previously destroyed)
destroy() - destroy the tooltip

Properties that are able for setOptions method:

Options Default Possible values Description
whereToShow "bottom" "top" where to show the tooltip relatively to the element
duration ".3s" any valid duration in ms animation duration
property "opacity" transition-property could be any css transition-property valid value
tooltip "*[title]" "*[data-tooltip]" define the elements to tooltip

About

The simple tooltip plugin in pure JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published