-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.html
More file actions
43 lines (41 loc) · 1.83 KB
/
examples.html
File metadata and controls
43 lines (41 loc) · 1.83 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
<!DOCTYPE html>
<html>
<head>
<title>Squelchpad Examples</title>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/jquery-color/jquery.color.js"></script>
<script src="src/squelchpad.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<script src="https://cdn.jsdelivr.net/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script>$(function($) {
$('#bt0').squelch( { baseColor: 'red', toggle: true });
$('#bt0').on('squelchOn', function() { $('#bt0-text').text('Squelched'); });
$('#bt0').on('squelchOff', function() { $('#bt0-text').text('Unsquelched'); });
$('#bt1').squelch( { baseColor: 'green', toggle: true });
$('#bt1').on('squelchOn', function() { $('#bt0').squelch({readOnly: true}); $('#bt1-text').text('button 1 frozen'); });
$('#bt1').on('squelchOff', function() { $('#bt0').squelch({readOnly: false}); $('#bt1-text').text(''); });
$('#bt2').squelch( { baseColor: 'blue', toggle: 5 });
$('#bt2').on('squelchOn', function(el, ev) { $('#bt2-text').text('Squelched - level ' + ev.level ); });
$('#bt2').on('squelchLevel', function(el, ev) { $('#bt2-text').text('Changed - level ' + ev.level ); });
$('#bt2').on('squelchOff', function() { $('#bt2-text').text('Unsquelched'); });
});</script>
</head>
<body>
<div class="container">
<H1>Toggle</H1>
<table>
<tr>
<td><div class="squelch" id="bt0"></div></td>
<td><div class="squelch" id="bt1"></div></td>
<td><div class="squelch" id="bt2"></div></td>
</tr>
<tr>
<td><span id="bt0-text">toggle: true</span></td>
<td><span id="bt1-text">toggle: true</span></td>
<td><span id="bt2-text">toggle: 5</span></td>
</tr>
</table>
</div>
</body>
</html>