-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
77 lines (67 loc) · 2.35 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
<html lang="en">
<head>
<meta charset="utf-8">
<title>Refreshing box</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" href="./dist/jquery.refreshingBox.css" />
</head>
<body>
<div class="container">
<h2>The refreshing-box demo</h2>
<p>Simple use:</p>
<pre><code>
$('.refreshing-box').refreshingBox({
description: 'Aggiorna automaticamente',
table: true,
checkBoxId: '',
interval: 1000,
//checked: true,
onRefresh: function() {
$('#console').append(new Date() + '<br/>');
},
onStart: function() {
$('#console').append('started' + '<br/>');
},
onStop: function() {
$('#console').append('stopped' + '<br/>');
}
});
</code></pre>
</div>
<div class="container refreshing-box"></div>
<div class="container">
<button id="point">Toggle Value Programmatically</button>
</div>
<div id="console" class="container" style="max-height:120px;"></div>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script>
<script src="./dist/jquery.refreshingBox.js"></script>
<script>
$(document).ready(function(){
$('.refreshing-box').refreshingBox({
description: 'Auto update',
table: true,
checkBoxId: '',
interval: 1000,
//checked: true,
onRefresh: function() {
$('#console').append(new Date() + '<br/>');
},
onStart: function() {
$('#console').append('started' + '<br/>');
},
onStop: function() {
$('#console').append('stopped' + '<br/>');
}
});
$('#point').click(function(){
var oo = $('.refreshing-box').refreshingBox('value');
$('.refreshing-box').refreshingBox('value', !oo);
});
});
</script>
</body>