An open API service indexing awesome lists of open source software.

https://github.com/serbanghita/tooltip.js

Plain JavaScript method to create a tooltip for a HTML element.
https://github.com/serbanghita/tooltip.js

Last synced: 6 months ago
JSON representation

Plain JavaScript method to create a tooltip for a HTML element.

Awesome Lists containing this project

README

          

Simple JavaScript tooltip for HTML elements. No extra CSS required.

##### Browser support

Chrome 7, Firefox 4.0, IE9 Opera 11.60, Safari 5.1.4.
The browser support can be extended to IE8 and friends if you have a polyfill for [`Function.prototype.bind`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)

##### Example

```html

```

You can send the content as a string:

```javascript
new tooltip({
elem: document.getElementById('myLinkId'),
content: '

My HTML content here.
'
});
```

You can send the content as a DOM node:

```javascript
new tooltip({
elem: document.getElementById('myLinkId'),
content: document.getElementById('myLinkTooltipContent')
});
```

##### Theming

```html






```

##### Screenshots

##### Contribute

Add an issue or fork the project and submit a pull request.

If this script helped you save a lot of developing time, I really appreciate any donations
.