# lagden-tooltip

> Tooltip do Osvaldas

Latest version **2.0.0** (published 2016-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install lagden-tooltip
pnpm add lagden-tooltip
yarn add lagden-tooltip
bun add lagden-tooltip
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-03-17 |
| First published | 2015-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thiago Lagden |
| Maintainers | lagden |
| Keywords | tooltip, bubble |

## Links

- npm: https://www.npmjs.com/package/lagden-tooltip
- Repository: https://github.com/lagden/tooltip
- Homepage: https://github.com/lagden/tooltip#readme
- Issues: https://github.com/lagden/tooltip/issues
- npm.io page: https://npm.io/package/lagden-tooltip

## Dependencies (1)

- [lagden-utils](https://npm.io/package/lagden-utils.md) ^2.1.3

## Recent versions

- 2.0.0 (latest) — 2016-03-17
- 1.0.2 — 2015-10-02
- 1.0.1 — 2015-10-02
- 1.0.0 — 2015-10-01

## README

# Tooltip 
[![Build Status][ci-img]][ci]
[![Dependency Status][dep-img]][dep]
[![devDependency Status][devDep-img]][devDep]

[ci-img]:     https://travis-ci.org/lagden/tooltip.svg
[ci]:         https://travis-ci.org/lagden/tooltip
[cover-img]:  https://codecov.io/github/lagden/tooltip/coverage.svg?branch=master
[cover]:      https://codecov.io/github/lagden/tooltip?branch=master
[dep-img]:    https://david-dm.org/lagden/tooltip/dev-status.svg
[dep]:        https://david-dm.org/lagden/tooltip#info=devDependencies
[devDep-img]: https://david-dm.org/lagden/tooltip/dev-status.svg
[devDep]:     https://david-dm.org/lagden/tooltip#info=devDependencies

A simple tooltip

## Install

`AMD` and `ES6` via [NPM](https://www.npmjs.com/)  

```
npm i -S lagden-tooltip
```

Only `AMD` via [bower](https://bower.io/) 

```
bower install -S lagden-tooltip
```


## API

### Methods

There are three methods: `show`, `hide` and `destroy`.

### Options

Some options can be passed when initialize:

| Option | Description | Default |
| --- | --- | --- |
| attr | Specify from whence come the value | `'data-lagden-tip'` |
| content | Custom value | `false` |
| html | Escaping your value | `false` |
| css | The component stylesheet class name | `'theTooltip'` |
| place | Force the place where shown the tooltip. Possibles values: `auto`, `top` and `bottom` | `'auto'` |
| space | Add some space between target and tooltip | `15` |
| fixed | Avoid position error if the target is fixed or is within a fixed element | `false` |

## Usage

There are two ways:

### Vanilla

```javascript
var t = document.querySelector('#el');
var tooltip = new Tooltip(t, {content: 'Example!'});
```

### jQuery

```javascript
var $t = $('#el');
$t.theTooltip({
  content: '<h3>Title</h3><p>Some pretty cool stuff!</p>',
  html: true
});
```


## Stylesheet

Take a look on [stylus/tooltip.styl](https://github.com/lagden/tooltip/blob/master/stylus/tooltip.styl) file.


## Example

See [here](http://lagden.github.io/tooltip/).
![Example](https://raw.githubusercontent.com/lagden/tooltip/master/animation.gif)


## License

MIT © [Thiago Lagden](http://lagden.in)

---
_Source: https://npm.io/package/lagden-tooltip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
