-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (47 loc) · 1.25 KB
/
index.html
File metadata and controls
52 lines (47 loc) · 1.25 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Timepicker</title>
<link rel="stylesheet" href="css/style.css">
<style type="text/css">
button {
display: inline-block;
padding: 4px 10px;
margin: 0;
border: 1px solid transparent;
font-size: .8em;
color: white;
background-color: #1570A6;
cursor: pointer;
}
button:hover
{
background-color: #083047;
color: white;
}
div {
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="test"></div>
<div>
<button class="getTime">get time(see it in console)</button>
<button class="setTime">set time to 17</button>
</div>
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>-->
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/_time.js"></script>
<script type="text/javascript">
var time = $('.test').time({hours:15, minutes: 20}).data('timePicker');
$('.getTime').on('click', function() {
console.log(time.getTime());
});
$('.setTime').on('click', function() {
time.setTime({hours:17, minutes: 0, seconds: 53})
});
</script>
</body>
</html>