forked from olton/metroui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotify.html
More file actions
145 lines (131 loc) · 5.64 KB
/
Copy pathnotify.html
File metadata and controls
145 lines (131 loc) · 5.64 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="product" content="Metro UI CSS Framework">
<meta name="description" content="Simple responsive css framework">
<meta name="author" content="Sergey S. Pimenov, Ukraine, Kiev">
<link href="css/metro-bootstrap.css" rel="stylesheet">
<link href="css/metro-bootstrap-responsive.css" rel="stylesheet">
<link href="css/docs.css" rel="stylesheet">
<link href="js/prettify/prettify.css" rel="stylesheet">
<!-- Load JavaScript Libraries -->
<script src="js/jquery/jquery.min.js"></script>
<script src="js/jquery/jquery.widget.min.js"></script>
<script src="js/jquery/jquery.mousewheel.js"></script>
<script src="js/prettify/prettify.js"></script>
<!-- Metro UI CSS JavaScript plugins -->
<script src="js/load-metro.js"></script>
<!-- Local JavaScript -->
<script src="js/docs.js"></script>
<script src="js/github.info.js"></script>
<title>Metro UI CSS : Metro Bootstrap CSS Library</title>
</head>
<body class="metro">
<header class="bg-dark" data-load="header.html"></header>
<div class="container">
<h1>
<a href="/"><i class="icon-arrow-left-3 fg-darker smaller"></i></a>
Notify<small class="on-right">plugin</small>
</h1>
<div class="example">
<button class="button primary" id="notify_btn_1">Notify</button>
<button class="button success" id="notify_btn_2">Notify many</button>
<script>
$(function(){
$('#notify_btn_1').on('click', function(){
$.Notify({
shadow: true,
position: 'bottom-right',
content: "Metro UI CSS is awesome!!!"
});
});
$('#notify_btn_2').on('click', function(){
setTimeout(function(){
$.Notify({style: {background: '#1ba1e2', color: 'white'}, caption: 'Info...', content: "Metro UI CSS is Simple!!!"});
}, 1000);
setTimeout(function(){
$.Notify({style: {background: 'red', color: 'white'}, content: "Metro UI CSS is Sufficient!!!"});
}, 2000);
setTimeout(function(){
$.Notify({style: {background: 'green', color: 'white'}, content: "Metro UI CSS is Responsive!!!"});
}, 3000);
setTimeout(function(){
$.Notify({content: "Default style for notify"});
}, 4000);
});
});
</script>
</div>
<pre class="prettyprint linenums">
// By setting parameters
$('#notify_btn_1').on('click', function(){
var not = $.Notify({
caption: "Try it"
content: "Metro UI CSS is awesome!!!",
timeout: 10000 // 10 seconds
});
});
// Alternatively with default parameters
$('#notify_btn_1').on('click', function(){
var not2 = $.Notify.show("Metro UI CSS is awesome!!!");
var not3 = $.Notify.show("Metro UI CSS is awesome!!!", "Info...");
});
// Cancel timeout
not.clear();
// Reset timeout
not.close(1000);
// Close the notification immediately
not.close();
// Close all notifications and open a new one
// Do not close notifications which have already been closed
not2.closeAll().init({caption:"Done", content:"Finally"});
</pre>
<h3>Parameters:</h3>
<table class="table border striped">
<tr>
<td>icon</td>
<td></td>
<td>Not yet implemented</td>
</tr>
<tr>
<td>caption</td>
<td>string</td>
<td>Notify title</td>
</tr>
<tr>
<td>content</td>
<td>string</td>
<td>Notify message</td>
</tr>
<tr>
<td>shadow</td>
<td>boolean</td>
<td>Show or hide Notify shadow (default: true)</td>
</tr>
<tr>
<td>width</td>
<td>int</td>
<td>default 'auto', if value != auto min-width sets</td>
</tr>
<tr>
<td>height</td>
<td>int</td>
<td>default 'auto', if value != auto min-height sets</td>
</tr>
<tr>
<td>style</td>
<td>{background: 'value', color: 'value'} or false</td>
<td>default false, you can set background and font color</td>
</tr>
<tr>
<td>timeout</td>
<td>int</td>
<td>milliseconds to hide notify, default 3000, null to disable timeout</td>
</tr>
</table>
</div>
<script src="js/hitua.js"></script>
</body>
</html>