Tip

Tip component. Inspired by tipsy without the weird jQuery
API.

js tip component
js tip with markup

js maru

Installation

$ npm install tip-component

Features

Events

API

Tip(el, [options])

Attach a Tip to an element, and display the title
attribute's contents on hover. Optionally apply a hide delay
in milliseconds.

var tip = require('tip');
tip('a[title]', { delay: 300 });

new Tip(content)

Create a new tip with content being
either a string, html, element, etc.

var Tip = require('tip');
var tip = new Tip('Hello!');
tip.show('#mylink');

Tip#position(type)

Tip#show(el)

Show the tip attached to el, where el
may be a selector or element.

Tip#hide([ms])

Hide the tip immediately or wait ms.

Tip#effect(name)

Use effect name. Default with Tip.effect = 'fade' for example.

Themes

License

MIT