Skip to content

Commit 29ba526

Browse files
committed
Update README.md
1 parent b6c71dd commit 29ba526

File tree

1 file changed

+30
-23
lines changed

1 file changed

+30
-23
lines changed

README.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,42 @@ jGrowl can be added to your project using package managers like bower and npm or
66

77
Use cdnjs:
88

9-
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js" />
10-
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js"></script>
9+
```html
10+
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js" />
11+
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js"></script>
12+
```
1113

1214
Install with bower
1315

14-
bower install https://github.com/stanlemon/jGrowl.git#master
16+
```
17+
bower install https://github.com/stanlemon/jGrowl.git#master
18+
```
1519

1620
Install with
1721

18-
npm install jgrowl
22+
```
23+
npm install jgrowl
24+
```
1925

20-
## Example usages
21-
// Sample 1
22-
$.jGrowl("Hello world!");
23-
// Sample 2
24-
$.jGrowl("Stick this!", { sticky: true });
25-
// Sample 3
26-
$.jGrowl("A message with a header", { header: 'Important' });
27-
// Sample 4
28-
$.jGrowl("A message that will live a little longer.", { life: 10000 });
29-
// Sample 5
30-
$.jGrowl("A message with a beforeOpen callback and a different opening animation.", {
31-
beforeClose: function(e,m) {
32-
alert('About to close this notification!');
33-
},
34-
animateOpen: {
35-
height: 'show'
36-
}
37-
});
26+
```js
27+
// Sample 1
28+
$.jGrowl("Hello world!");
29+
// Sample 2
30+
$.jGrowl("Stick this!", { sticky: true });
31+
// Sample 3
32+
$.jGrowl("A message with a header", { header: 'Important' });
33+
// Sample 4
34+
$.jGrowl("A message that will live a little longer.", { life: 10000 });
35+
// Sample 5
36+
$.jGrowl("A message with a beforeOpen callback and a different opening animation.", {
37+
beforeClose: function(e,m) {
38+
alert('About to close this notification!');
39+
},
40+
animateOpen: {
41+
height: 'show'
42+
}
43+
});
44+
```
3845

3946
## Configuration Options
4047
| Option | Default | Description |
@@ -63,4 +70,4 @@ Install with
6370
| beforeClose | function(e,m,o) {} | Callback to be used before a new notification is closed. This callback receives the notification's DOM context, the notifications message and it's option object. |
6471
| close | function(e,m,o) {} | Callback to be used when a new notification is closed. This callback receives the notification's DOM context, the notifications message and it's option object. |
6572
| animateOpen | { opacity: 'show' } | The animation properties to use when opening a new notification (default to fadeOut). |
66-
| animateClose | { opacity: 'hide' } | The animation properties to use when closing a new notification (defaults to fadeIn). |
73+
| animateClose | { opacity: 'hide' } | The animation properties to use when closing a new notification (defaults to fadeIn). |

0 commit comments

Comments
 (0)