-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
129 lines (105 loc) · 3.55 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
<!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>Simplebox demo</title>
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/simplebox.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.easing.js"></script>
<script type="text/javascript" src="js/simplebox.js"></script>
<script type="text/javascript">
jQuery(function($) {
$("#btnDemo").bind("click", function(){
$.simplebox.show('test',{
title: 'Test caption',
buttons: {
Close: function(){
this.close();
}
}
});
});
$("#btnDemo2").bind("click", function(){
$.simplebox.show('test',{
title: 'Test caption',
theme: "dark",
buttons: {
Close: function(){
this.close();
}
}
});
});
$("#btnAlert").bind("click", function(){
$.simplebox.alert('This is an alert!');
});
$("#btnConfirm").bind("click", function(){
$.simplebox.confirm('Message to confirm', function(){
alert("Yep, confirmed!");
this.close();
});
});
$.simplebox.gallery("demo");
});
</script>
</head>
<body>
<div class="wrapper">
<h1>Simplebox <span>- a product by <a href="http://d-xp.com">d-xp.com</a></span></h1>
<p>
... just a simple box.
</p>
<p>
<button id="btnDemo">Click me</button>
<button id="btnDemo2">Dark theme</button>
</p>
<h2>Usage</h2>
<p class="test">
<pre>
$.simplebox.show(content, <span style="color:#999;">{
//settings
'title' : false,
'closeOnEsc': true,
'theme' : 'default',
'height' : 'auto',
'width' : 'auto',
'speed' : 500,
'easing' : 'swing',
'buttons' : false,
//events
'beforeShow' : function(){},
'beforeClose' : function(){},
'onClose' : function(){}
}</span>);
</pre>
where content could be a string, dom element or jQuery element.
</p>
<h2>Shortcuts</h2>
<p>
<button id="btnAlert">Alert</button>
<pre>
$.simplebox.alert("...")
</pre>
<button id="btnConfirm">Confirm</button>
<pre>
$.simplebox.confirm("...", function(){
//your callback code
});
</pre>
</p>
<h2>Gallery</h2>
<p>
<a href="images/slide0.jpg" data-gal="demo" data-type="image">Image 1</a>
<a href="images/slide1.jpg" data-gal="demo" data-type="image">Image 2</a>
<a href="images/slide2.jpg" data-gal="demo" data-type="image">Image 3</a>
<a href="images/slide3.jpg" data-gal="demo" data-type="image">Image 4</a>
<pre>
$.simplebox.gallery("groupname");
</pre>
</p>
<h2>Code</h2>
<p><a href="https://github.com/aheinze/Simplebox">Fork me on github</a></p>
</div>
</body>
</html>