32 lines
566 B
Markdown
32 lines
566 B
Markdown
# Tooltips based on popper js
|
|
|
|
### Installation
|
|
__install popper__
|
|
```
|
|
npm install popper.js tooltip.js --save
|
|
```
|
|
|
|
__import tooltip JS__
|
|
```
|
|
import { Tooltip } from 'js-modules';
|
|
Tooltip(jQuery);
|
|
|
|
jQuery(document).ready(function() {
|
|
jQuery('[data-tooltip]').each(function() {
|
|
jQuery(this).tt({prefix: ''});
|
|
});
|
|
})
|
|
|
|
Wenn ein Prfix (z.B. 'tw-' für Klassen) benutzt wird, bitte 'tw-' bei Prefix angeben.
|
|
```
|
|
|
|
__import Tailwind CSS__
|
|
```
|
|
var modules = require('./assets/js/js-modules/tailwind/index.js');
|
|
...
|
|
plugins: [
|
|
modules.tooltip()
|
|
]
|
|
...
|
|
```
|