-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
222 lines (219 loc) · 7.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Modal 1.2.3 | CreativeDream</title>
<!--Stylesheets-->
<link href="css/jquery.modal.css" type="text/css" rel="stylesheet" />
<link href="css/jquery.modal.theme-xenon.css" type="text/css" rel="stylesheet" />
<link href="css/jquery.modal.theme-atlant.css" type="text/css" rel="stylesheet" />
<!--jQuery-->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="js/jquery.modal.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
//alert
$('a#alert').click(function() {
modal({
type: 'alert',
title: 'Alert',
text: "Simple Message!"
});
});
//confirm
$('a#confirm').click(function() {
modal({
type: 'confirm',
title: 'Confirm',
text: 'Are you sure you want to delete your brain?',
callback: function(result) {
alert(result);
}
});
});
//prompt
$('a#prompt').click(function() {
modal({
type: 'prompt',
title: 'Prompt',
text: 'Type your name:',
callback: function(result) {
alert(result);
}
});
});
//success
$('a#success').click(function() {
modal({
type: 'success',
title: 'Success',
text: 'A simple success message!',
});
});
//warning
$('a#warning').click(function() {
modal({
type: 'warning',
title: 'Warning',
text: 'A simple warning message!',
center: false,
});
});
//info
$('a#info').click(function() {
modal({
type: 'info',
title: 'Info',
text: 'A simple info message!',
autoclose: true,
});
});
//error
$('a#error').click(function() {
modal({
type: 'error',
title: 'Error',
text: 'A simple error message!',
});
});
//inverted
$('a#inverted').click(function() {
modal({
type: 'inverted',
title: 'Inverted',
text: 'A simple inverted message!',
});
});
//primary
$('a#primary').click(function() {
modal({
type: 'primary',
title: 'Primary',
text: 'A simple primary message!',
});
});
//custom
$('a#custom').click(function() {
modal({
type: 'primary', //Type of Modal Box (alert | confirm | prompt | success | warning | error | info | inverted | primary)
title: 'Message', //Modal Title
text: 'Simple primary message with custom options and <b>Xenon</b> theme.', //Modal HTML Content
size: 'normal', //Modal Size (normal | large | small)
buttons: [{
text: 'OK', //Button Text
val: 'ok', //Button Value
eKey: true, //Enter Keypress
addClass: 'btn-light-blue btn-square', //Button Classes (btn-large | btn-small | btn-green | btn-light-green | btn-purple | btn-orange | btn-pink | btn-turquoise | btn-blue | btn-light-blue | btn-light-red | btn-red | btn-yellow | btn-white | btn-black | btn-rounded | btn-circle | btn-square | btn-disabled)
onClick: function(argument) {
console.log(argument);
alert('Look in console!');
}
}, ],
center: true, //Center Modal Box?
autoclose: false, //Auto Close Modal Box?
callback: null, //Callback Function after close Modal (ex: function(result){alert(result);})
onShow: function(r) {
console.log(r);
}, //After show Modal function
closeClick: true, //Close Modal on click near the box
closable: true, //If Modal is closable
theme: 'xenon', //Modal Custom Theme
animate: true, //Slide animation
background: 'rgba(0,0,0,0.35)', //Background Color, it can be null
zIndex: 1050, //z-index
buttonText: {
ok: 'OK',
yes: 'Yes',
cancel: 'Cancel'
},
template: '<div class="modal-box"><div class="modal-inner"><div class="modal-title"><a class="modal-close-btn"></a></div><div class="modal-text"></div><div class="modal-buttons"></div></div></div>',
_classes: {
box: '.modal-box',
boxInner: ".modal-inner",
title: '.modal-title',
content: '.modal-text',
buttons: '.modal-buttons',
closebtn: '.modal-close-btn'
}
});
});
//custom2
$('a#custom2').click(function() {
modal({
type: 'inverted', //Type of Modal Box (alert | confirm | prompt | success | warning | error | info | inverted | primary)
title: 'Message', //Modal Title
text: 'Simple primary message with custom options and <b>Atlant</b> theme.<br>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.', //Modal HTML Content
size: 'normal', //Modal Size (normal | large | small)
buttons: [{
text: 'OK', //Button Text
val: 'ok', //Button Value
eKey: true, //Enter Keypress
addClass: 'btn-light-blue', //Button Classes (btn-large | btn-small | btn-green | btn-light-green | btn-purple | btn-orange | btn-pink | btn-turquoise | btn-blue | btn-light-blue | btn-light-red | btn-red | btn-yellow | btn-white | btn-black | btn-rounded | btn-circle | btn-square | btn-disabled)
onClick: function(argument) {
console.log(argument);
alert('Look in console!');
}
}, ],
center: true, //Center Modal Box?
autoclose: false, //Auto Close Modal Box?
callback: null, //Callback Function after close Modal (ex: function(result){alert(result);})
onShow: function(r) {}, //After show Modal function
closeClick: true, //Close Modal on click near the box
closable: true, //If Modal is closable
theme: 'atlant', //Modal Custom Theme
animate: false, //Slide animation
background: 'rgba(0,0,0,0.35)', //Background Color, it can be null
zIndex: 1050, //z-index
buttonText: {
ok: 'OK',
yes: 'Yes',
cancel: 'Cancel'
},
template: '<div class="modal-box"><div class="modal-inner"><div class="modal-title"><a class="modal-close-btn"></a></div><div class="modal-text"></div><div class="modal-buttons"></div></div></div>',
_classes: {
box: '.modal-box',
boxInner: ".modal-inner",
title: '.modal-title',
content: '.modal-text',
buttons: '.modal-buttons',
closebtn: '.modal-close-btn'
}
});
});
//custom3
$('a#custom3').click(function() {
modal({
type: 'default', //Type of Modal Box (alert | confirm | prompt | success | warning | error | info | inverted | primary)
title: 'Message', //Modal Title
text: 'Simple message with custom options and <b>Reseted</b> theme.', //Modal HTML Content
//buttons : null,
theme: 'reseted'
});
});
});
</script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<h1>jQuery Modal 1.2.3</h1>
<p>************</p>
<hr />
<h3>Demo:</h3>
<!-- Buttons -->
<div> <a href="#" id="alert">Alert</a>
<br> <a href="#" id="confirm">Confirm</a>
<br> <a href="#" id="prompt">Prompt</a>
<br> <a href="#" id="success">Success</a>
<br> <a href="#" id="warning">Warning</a>
<br> <a href="#" id="info">Info</a>
<br> <a href="#" id="error">Error</a>
<br> <a href="#" id="inverted">Inverted</a>
<br> <a href="#" id="primary">Primary</a>
<br>
<br> <a href="#" id="custom">Custom | Xenon Theme</a>
<br> <a href="#" id="custom2">Custom | Atlant Theme</a>
<br> <a href="#" id="custom3">Custom | Reseted</a> </div>
<hr /> © 2015 <b>CreativeDream</b>. </body>
</html>