forked from olton/metroui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotify.html
139 lines (128 loc) · 5.38 KB
/
notify.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<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="page">
<div class="page-region">
<div class="page-region-content">
<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">
//with parameters sets
$('#notify_btn_1').on('click', function(){
$.Notify({
content: "Metro UI CSS is awesome!!!"
});
});
// alternate with default parameters
$('#notify_btn_1').on('click', function(){
$.Notify.show("Metro UI CSS is awesome!!!");
$.Notify.show("Metro UI CSS is awesome!!!", "Info...");
});
</pre>
<h3>Parameters:</h3>
<table class="table border striped">
<tr>
<td>icon</td>
<td></td>
<td></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</td>
</tr>
</table>
</div>
</div>
<div class="page-footer">
<div class="page-footer-content">
<!--<div data-load="header.html"></div>-->
</div>
</div>
</div>
<script src="js/hitua.js"></script>
</body>
</html>