-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (92 loc) · 3.34 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
<!DOCTYPE html>
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TickWatch-js - Basic Usage</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<link rel="stylesheet" href="dist/style.css">
</head>
<body>
<div class="container">
<div class="card mt-5 p-3">
<h1 class="h1">TickWatch-js - Basic Usage</h1>
<div class="row">
<div class="col-md-6 row px-5">
<h2 class="h2">Timer</h2>
<div class="timer d-flex justify-content-center">
</div>
<button class="btn btn-primary mt-3" id="start">Start</button>
<button class="btn btn-primary mt-3" id="stop">Stop</button>
<button class="btn btn-primary mt-3" id="clear">Clear</button>
</div>
<div class="col-md-6 row px-5">
<h2 class="h2">Display</h2>
<div class="display d-flex justify-content-center">
</div>
<div class="mb-3">
<label for="number" class="form-label">Time</label>
<input type="text" class="form-control" id="number" name="number" placeholder="number : 15">
</div>
<button type="button" class="btn btn-primary" id="set">Set</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
<script src="dist/TickWatch.min.js"></script>
<script>
$(document).ready(function() {
const timerElement = $('.timer');
timerElement.TickWatch({
direction: 'down',
startTime: "00:00:10",
});
$('#stop').on('click', function () {
timerElement.TickWatch('stop');
});
$('#start').on('click', function () {
timerElement.TickWatch('start');
});
$('#clear').on('click', function () {
timerElement.TickWatch('clear');
});
const displayElement = $('.display');
displayElement.TickWatch({
displayOnly: true,
displaySize: 2,
});
$('#set').on('click', function () {
displayElement.TickWatch('set', $("#number").val());
});
});
</script>
<!--<script type="module">
import './index.js';
$(document).ready(function() {
const timerElement = $('.timer');
timerElement.TickWatch({
direction: 'down',
startTime: "00:00:10",
});
$('#stop').on('click', function () {
timerElement.TickWatch('stop');
});
$('#start').on('click', function () {
timerElement.TickWatch('start');
});
$('#clear').on('click', function () {
timerElement.TickWatch('clear');
});
const displayElement = $('.display');
displayElement.TickWatch({
displayOnly: true,
displaySize: 2,
});
$('#set').on('click', function () {
displayElement.TickWatch('set', $("#number").val());
});
});
</script>-->
</body>
</html>