Skip to content

Commit 7dbfcf3

Browse files
committed
my first readme.
1 parent 962e33f commit 7dbfcf3

File tree

1 file changed

+81
-2
lines changed

1 file changed

+81
-2
lines changed

README.md

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,83 @@
1-
jQuery.MsgBox
1+
jQuery MsgBox
22
=============
33

4-
Firefox style simplist dialog form.
4+
What is it?
5+
-----------
6+
7+
Firefox style simplist dialog form.
8+
9+
10+
How to use this?
11+
----------------
12+
13+
It's quiet simple.
14+
15+
```html
16+
<script src="jquery.lastest.js"></script>
17+
<script src="jquery.msgbox.min.js"></script>
18+
```
19+
20+
alert("i'm alert");
21+
-> $.alert("i'm alert");
22+
23+
confirm("Are you sure?");
24+
-> $.confirm("Are you sure?");
25+
26+
prompt("please text me.");
27+
-> $.prompt("please text me.");
28+
29+
Wait! YOU MUST SEE BEFORE USE THIS PLUGIN,
30+
------------------------------------------
31+
this plugin is can't replace as javascript standard function (alert, etc.)
32+
because, this plugin cannot wait user action while showing dialog.
33+
If you want get user's action, put a callback function in next of message param.
34+
when user clicked in a dialog button, such as OK or cancel, msgbox will call your defined function.
35+
36+
OK. so, How to use with callback function?
37+
------------------------------------------
38+
39+
jQuery.MsgBox can add your callback function for provide next action after user clicked.
40+
It's Very simple.
41+
42+
```js
43+
$.alert("click me.",function(){
44+
$.alert('you clicked');
45+
});
46+
```
47+
```js
48+
$.confirm("press OK or Cancel.",function(bool){
49+
$.alert('you clicked'+(bool?'OK':'cancel'));
50+
});
51+
```
52+
```js
53+
$.prompt("what's your name?",function(string){
54+
$.alert('your name is '+string);
55+
});
56+
```
57+
58+
What browser can run with this plugin?
59+
--------------------------------------
60+
first, jQuery 1.4 or later needed.
61+
and, You can run with most popular major browser,
62+
Internet Explorer 8 or above, Firefox 3 or above, Safari 4 or above, Chrome 10 or above, Opera 9 or above.
63+
NOTE : Old school browser, such as IE 7 or lower is have a problem with CSS issue.
64+
that's all. this plugin have NO images or other resources.
65+
66+
Wow! It's simple and cool! can I join with you for make better this plugin?
67+
---------------------------------------------------------------------------
68+
69+
Sure. contributes are welcome! just fork this plugin and get involved to make a better place for you and for me.
70+
71+
72+
License
73+
-------
74+
75+
(The MIT License)
76+
77+
Copyright (c) 2011-2012 ukjin yang <ukjinplant@msn.com>
78+
79+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
80+
81+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
82+
83+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)