-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
67 lines (63 loc) · 2.61 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
<!DOCTYPE html>
<html>
<head>
<title>notiModal demo</title>
<link rel="stylesheet" type="text/css" href="demo/css/bootstrap.popover.min.css">
<link rel="stylesheet" type="text/css" href="demo/css/demo.css">
</head>
<body>
<a href="https://github.com/netfox01/notiModal"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"></a>
<div class="bg"></div>
<div class="name">
notiModal
</div>
<div class="container">
<button id="force-show" class="btn btn-default">Force "second_modal" show</button>
</div>
<script src="demo/js/jquery.js" type="text/javascript"></script>
<script src="notiModal.js" type="text/javascript" ></script>
<script>
// $.notiModal.config.sound = false;
// $.notiModal.config.auto_hide = true;
// $.notiModal.config.show_duration = 5000;
// create a notiModal
$.notiModal.init("first_modal", {
title: "hello again",
content: "I'm jus trying to make somthing <strong>nice</strong> here. <br /> Do you like it ?",
'ok': 'Yes i like it!',
'close': 'Not that much!',
'max_width': 420,
'no_more': 'Never show that again',
// ok callback
onOkClick: function (noti_modal) {
// hide current notiModal
noti_modal.hide();
alert('glade you like it! plz give this project a star.');
},
onClose: function (noti_modal) {
alert("i'd be happy to hear your feedback!");
}
});
// create another notiModal
$.notiModal.init("second_modal", {
title: "Hi there",
top: 300,
sound: true,
ok: "show another notiModal",
max_width: 800,
content: 'this is a notification modal',
// ok callback
onOkClick: function (noti_modal) {
// hide current notiModal
noti_modal.hide()
// get and show the first created notiModal
$.notiModal.get("first_modal").show();
}
})
.show();
$('#force-show').click(function () {
$.notiModal.get("second_modal").show({force: true});
})
</script>
</body>
</html>