Skip to content

Commit f15794f

Browse files
authored
update readme
1 parent 14c29d2 commit f15794f

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

README.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,11 @@ There are 5 predefined custom classes in CSS: `.tooltip-primary`, `.tooltip-succ
99
![Bootstrap Tooltip Custom Class Preview](https://i.imgur.com/CNoQ13w.png)
1010

1111

12+
## Installation
13+
To install latest version via `npm` run:
1214

13-
## Usage
14-
15-
- Use `data-custom-class` attribute:
16-
17-
```html
18-
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" data-custom-class="tooltip-custom" title="Custom tooltip example">Tooltip example</button>
1915
```
20-
21-
or
22-
23-
- Use `customClass` parameter on plugin initialization:
24-
```javascript
25-
$(function () {
26-
$('.my-element').tooltip({
27-
customClass: 'tooltip-custom'
28-
});
29-
});
16+
npm install bootstrap-tooltip-custom-class
3017
```
3118

3219
## Setup
@@ -56,6 +43,25 @@ Include the script after Bootstrap's main javascript file:
5643
<script src="bootstrap-tooltip-custom-class.js"></script>
5744
```
5845

46+
## Usage
47+
48+
- Use `data-custom-class` attribute:
49+
50+
```html
51+
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" data-custom-class="tooltip-custom" title="Custom tooltip example">Tooltip example</button>
52+
```
53+
54+
or
55+
56+
- Use `customClass` parameter on plugin initialization:
57+
```javascript
58+
$(function () {
59+
$('.my-element').tooltip({
60+
customClass: 'tooltip-custom'
61+
});
62+
});
63+
```
64+
5965
## Demo
6066

6167
- Bootstrap v4 (Bootstrap v4.0.0-beta, Bootstrap v4.0.0, Bootstrap v4.1): [Codepen](https://codepen.io/andreivictor/pen/ayewjW)

0 commit comments

Comments
 (0)