Skip to content

Commit b2faa8c

Browse files
author
Shane Stebner
committed
2 parents b5c39d8 + 0086e43 commit b2faa8c

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ by Versatility Werks http://flwebsites.biz
77
Demo & Detailed Docs
88
=======
99
http://flwebsites.biz/jAlert/
10+
===
11+
YOU SHOULD REALLY GO TO THE DOCUMENTATION LINK ABOVE. IT'S ALWAYS UPDATED AND HAS MUCH MORE INFORMATION AVAILABLE.
1012

1113
What is it?
1214
=======
@@ -28,10 +30,31 @@ Include the JS file from the src folder before the `</body>`:
2830
<script src="jAlert-master/src/jAlert-functions.min.js"></script> <!-- COMPLETELY OPTIONAL -->
2931
```
3032

33+
To use the 'data-jAlert' attributes, you must attach the handlers (must be re-attached for newly added dynamic content):
34+
```html
35+
<a href='#' data-jAlert data-title='New jAlert!' data-content='Great job!'>Click Me</a>
36+
```
37+
```javascript
38+
$(function(){
39+
$.jAlert('attach');
40+
});
41+
```
42+
43+
### This is the default usage. Doesn't require jAlert-functions.js
44+
```javascript
45+
$.jAlert({ //this is the normal usage
46+
'title': 'Test',
47+
'content': 'Howdy',
48+
'theme': 'green',
49+
'size': 'xsm'
50+
});
51+
```
52+
3153
### Quick Use (requires jAlert-functions.js!!!)
3254
```javascript
33-
alert('hi'); //override is enabled by default works in code in console you get the default behavior and undefined
55+
alert('hi'); //override is enabled by default
3456
```
57+
Note: When you run alert() in your console, it works as expected but will return "undefined"...ignore that. It's just because the function doesn't return anything. Had to add this disclaimer because people got confused..lol..
3558
```javascript
3659
successAlert('Success', 'You did it!'); //green alert
3760
```
@@ -66,15 +89,6 @@ Include the JS file from the src folder before the `</body>`:
6689
console.log('denied');
6790
});
6891
```
69-
### This is the default usage. Doesn't require jAlert-functions.js
70-
```javascript
71-
$.jAlert({ //this is the normal usage
72-
'title': 'Test',
73-
'content': 'Howdy',
74-
'theme': 'green',
75-
'size': 'xsm'
76-
});
77-
```
7892
```javascript
7993
$.fn.jAlert.defaults.backgroundColor = 'white'; //override a default setting
8094

0 commit comments

Comments
 (0)