forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjquery.notifyBar-tests.ts
66 lines (62 loc) · 2.18 KB
/
jquery.notifyBar-tests.ts
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
/// <reference path="jquery.notifyBar.d.ts" />
$(function() {
$.notifyBar({
html: "Autostart"
});
$("#common").click(function () {
$.notifyBar();
});
$("#error").click(function () {
$.notifyBar({ cssClass: "error", html: "Error occurred!" });
});
$("#success").click(function () {
$.notifyBar({ cssClass: "success", html: "Your data has been changed!" });
});
$("#warning").click(function() {
$.notifyBar({ cssClass: "warning", html: "Settings aren't changed!" });
})
$("#custom").click(function () {
$.notifyBar({ cssClass: "custom", html: "Your data has been changed!" });
});
$("#close").click(function () {
$.notifyBar({ html: "Click 'close' to hide notify bar", close: true, closeOnClick: false });
});
$("#position").click(function () {
$.notifyBar({ html: "At bottom", position: "bottom" });
});
$("#events").click(function () {
$.notifyBar({
html: "Test events",
onBeforeShow: function () {
$("#onBeforeShow").html("onBeforeShow - ok");
},
onShow: function () {
$("#onShow").html("onShow - ok");
},
onBeforeHide: function () {
$("#onBeforeHide").html("onBeforeHide - ok");
},
onHide: function () {
$("#onHide").html("onHide - ok");
}
});
});
$("#delay").click(function () {
$.notifyBar({ html: "delay 1000000", delay: 1000000 });
});
$("#speed-string").click(function () {
$.notifyBar({ html: "speed normal", animationSpeed: "normal" });
});
$("#speed-number").click(function () {
$.notifyBar({ html: "speed normal", animationSpeed: 500 });
});
$("#jqObject").click(function () {
$.notifyBar({ html: "set jqObject", jqObject: $("#jqObject") });
});
$("#closeText").click(function () {
$.notifyBar({ html: "set close text", closeText: "close" });
});
$("#closeOnOver").click(function () {
$.notifyBar({ html: "enable close on over", close: false, closeOnClick: false, closeOnOver: true });
});
});