Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tooltip

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tooltip

Tooltip manager

  • 1.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.2K
increased by13.97%
Maintainers
1
Weekly downloads
 
Created
Source

Tooltip

Install

$ npm install tooltip --save

Usage

var tooltip = require('tooltip')

tooltip()
<h2 data-tooltip="tooltip text">Test the tooltip</h2>

Now hover over h2 and the tooltip will show.

Or, with config:

var tooltip = require('tooltip')
var config  = {
  showDelay: 100,
  style: {
    padding: 5
  }
}

tooltip(config)

Configs

  • target - defaults to document.documentElement. Tooltips will be displayed only for elements inside target.

  • style - styles to be applied to the tooltip element

  • className - a css class to be applied to the tooltip element. Defaults to "tooltip"

  • showDelay - defaults to 500 ms

  • visibleStyle - style to be applied to the tooltip element when it is visible

  • hiddenStyle - style to be applied to the tooltip element when it is hidden

  • offset - defaults to { x: 5, y: 5 }

  • attrName - defaults to "data-tooltip". Tooltip will show on hover over elements with this attribute.

    Specify data-tooltip-positions="top;bottom;left;right" to dictate the order of the positions preferred by the tooltip.

License

MIT

Keywords

FAQs

Package last updated on 17 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc