forked from iwayanwirka/dscountdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
307 lines (283 loc) · 8.29 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>dsCountDown | Easy and customizable count down plugin for jQuery</title>
<link rel='stylesheet' href='style.css' type='text/css' media='all' />
<link rel='stylesheet' href='dscountdown.css' type='text/css' media='all' />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script>
<!-- <script type="text/javascript" src="dscountdown.js"></script> -->
<script type="text/javascript" src="dscountdown.min.js"></script>
<script>
jQuery(document).ready(function($){
$('.demo1').dsCountDown({
endDate: new Date("December 13, 2013 11:13:00")
});
$('.demo2').dsCountDown({
endDate: new Date("January 13, 2014 11:23:00"),
theme: 'black'
});
$('.demo3').dsCountDown({
endDate: new Date("February 13, 2014 11:33:00"),
theme: 'red'
});
$('.demo4').dsCountDown({
endDate: new Date("March 13, 2014 11:43:00"),
theme: 'flat'
});
$('.demo5').dsCountDown({
endDate: new Date("April 13, 2014 11:53:00"),
theme: 'custome'
});
$('.demo6').dsCountDown({
endDate: new Date("May 13, 2014 11:53:00"),
titleDays: 'Hari',
titleHours: 'Jam',
titleMinutes: 'Menit',
titleSeconds: 'Detik'
});
$('.demo7').dsCountDown({
startDate: new Date("November 12, 2013 08:26:41"), // this value is picked up by PHP script <?php echo date('F d, Y h:i:s'); ?>
endDate: new Date("June 13, 2014 11:53:00")
});
});
</script>
</head>
<body id="ds-body">
<div class="wrapper">
<h1>dsCountDown</h1>
<p>Easy and customizable count down plugin for jQuery.<p>
<p>Released under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License.</a><br/>
Compatible with: jQuery 1.2.3+ in Firefox, Safari, Chrome, Opera, Internet Explorer 7+</p>
<p>
<strong>Features:</strong>
<ul>
<li>Easy to use</li>
<li>Customizable</li>
<li>Lot of theme options</li>
<li>Be able to load multiple time on one page</li>
<li>Be able to use server time</li>
</ul>
</p>
<h2>Demo</h2>
<ul>
<li>
<h3>Themes</h3>
<ul>
<li>
<h4>Default Theme</h4>
<br/>
<div class="demo1"></div>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo1"></div> </pre>
<br/>
<strong>Javascript</strong>
<br/>
<pre class="code">
$('.demo1').dsCountDown({
endDate: new Date("December 13, 2013 11:13:00"),
}); </pre>
<br/>
<br/>
</li>
<li>
<h4>Black Theme</h4>
<div class="demo2"></div>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo2"></div> </pre>
<br/>
<strong>Code</strong>
<br/>
<pre class="code">
$('.demo2').dsCountDown({
endDate: new Date("January 13, 2014 11:23:00"),
theme: 'black'
}); </pre>
<br/>
<br/>
</li>
<li>
<h4>Red Theme</h4>
<div class="demo3"></div>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo3"></div> </pre>
<br/>
<strong>Code</strong>
<br/>
<pre class="code">
$('.demo3').dsCountDown({
endDate: new Date("February 13, 2014 11:33:00"),
theme: 'red'
}); </pre>
<br/>
<br/>
</li>
<li>
<h4>Flat Theme</h4>
<div class="demo4"></div>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo4"></div> </pre>
<br/>
<strong>Code</strong>
<br/>
<pre class="code">
$('.demo4').dsCountDown({
endDate: new Date("March 13, 2014 11:43:00"),
theme: 'flat'
}); </pre>
<br/>
<br/>
</li>
<li>
<h4>Custom Theme (Not Styled)</h4>
<div class="demo5"></div>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo5"></div> </pre>
<br/>
<strong>Code</strong>
<br/>
<pre class="code">
$('.demo5').dsCountDown({
endDate: new Date("April 13, 2014 11:53:00"),
theme: 'custome'
}); </pre>
<br/>
<br/>
</li>
</ul>
</li>
<li>
<h3>Language</h3>
<br/>
<div class="demo6"></div>
<br/>
<p>Uses Bahasa Indonesia.</p>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo6"></div> </pre>
<br/>
<strong>Code</strong>
<br/>
<pre class="code">
$('.demo6').dsCountDown({
endDate: new Date("May 13, 2014 11:53:00"),
titleDays: 'Hari',
titleHours: 'Jam',
titleMinutes: 'Menit',
titleSeconds: 'Detik',
}); </pre>
<br/>
<br/>
</li>
<li>
<h3>Server Time (PHP Script)</h3>
<br/>
<p>Use server time for the count down, don't care about client time.</p>
<div class="demo7"></div>
<br/>
<br/>
<strong>HTML</strong>
<br/>
<pre class="code">
<div class="demo7"></div> </pre>
<strong>Code</strong>
<br/>
<pre class="code">
$('.demo7').dsCountDown({
startDate: new Date("<?php echo date('F d, Y h:i:s'); ?>"),
endDate: new Date("June 13, 2014 11:53:00")
}); </pre>
<br/>
<br/>
</li>
</ul>
<h2>How To Use</h2>
<br/>
<ol>
<li>
<span>Import jQuery library</span>
<pre class="code">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script> </pre>
<br/>
</li>
<li>
<span>Import dsCountDown CSS file</span>
<br/>
<pre class="code">
<link rel='stylesheet' href='css/dscountdown.css' type='text/css' media='all' /> </pre>
<br/>
</li>
<li>
<span>Import dsCountDown Javascript file</span>
<br/>
<pre class="code">
<script type="text/javascript" src="js/dscountdown.js"></script> </pre>
<br/>
</li>
<li>
<span>Add HTML Element</span>
<br/>
<pre class="code">
<div class="demo"></div> </pre>
<br/>
</li>
<li>
<span>Add Javascript Script</span>
<br/>
<pre class="code">
<script>
jQuery(document).ready(function($){
$('.demo').dsCountDown({
endDate: new Date("December 13, 2013 11:13:00")
});
});
</script> </pre>
<br/>
</li>
</ol>
<h2>Options</h2>
<br/>
<ul>
<li>startDate: new Date(), Date Object of starting time of count down, usualy now (whether client time or given php time)</li>
<li>endDate: null, Date Object of ends of count down</li>
<li>elemSelDays: '', Leave blank to use default value or provide a string selector if the lement already exist, Example: .ds-days</li>
<li>elemSelHours: '', Leave blank to use default value or provide a string selector if the lement already exist, Example: .ds-hours</li>
<li>elemSelMinutes: '', Leave blank to use default value or provide a string selector if the lement already exist, Example: .ds-minutes</li>
<li>elemSelSeconds: '', Leave blank to use default value or provide a string selector if the lement already exist, Example: .ds-seconds</li>
<li>theme: 'white', Set the theme 'white', 'black', 'red', 'flat', 'custome'</li>
<li>titleDays: 'Days', Set the title of days</li>
<li>titleHours: 'Hours', Set the title of hours</li>
<li>titleMinutes: 'Minutes', Set the title of minutes</li>
<li>titleSeconds: 'Seconds', Set the title of seconds</li>
</ul>
<br/>
<h2>Events</h2>
<br/>
<ul>
<li>onBevoreStart: null, callback before the count down starts</li>
<li>onClocking: null, callback after the timer just clocked</li>
<li>onFinish: null callback once the count down finish or 0 timer defined</li>
</ul>
<br/>
<h2>Contact</h2>
<p>By I Wayan Wirka<br/>I welcome email at [email protected], but I'm afraid I don't have time to answer personal requests for help regarding my plugins. Thanks!</p>
</div>
</body>
</html>