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.
- Host: GitHub
- URL: https://github.com/serbanghita/tooltip.js
- Owner: serbanghita
- License: other
- Created: 2013-10-02T14:56:28.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T10:33:10.000Z (over 7 years ago)
- Last Synced: 2025-03-24T07:48:53.462Z (7 months ago)
- Language: JavaScript
- Size: 59.6 KB
- Stars: 2
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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.