-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
89 lines (80 loc) · 2.39 KB
/
example.html
File metadata and controls
89 lines (80 loc) · 2.39 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
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
<!DOCTYPE html>
<html>
<head>
<!-- You MUST include jQuery 3.4+ before Fomantic -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.3/semantic.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.3/semantic.min.js"></script>
<script src="table-navigator.js"></script>
</head>
<body>
<button type="button" onclick="document.getElementById('table1').focus()">Table 1</button>
<!-- tabindex is required to enable focus on table with javascript or TAB -->
<table id="table1" class="ui celled table" tabindex="0">
<caption>Table 1</caption>
<thead>
<tr>
<th>Produto</th>
<th>Preço</th>
</tr>
</thead>
<tbody>
<tr>
<td>Notebook</td>
<td>R$ 4.500</td>
</tr>
<tr>
<td>Smartphone</td>
<td>R$ 1.200</td>
</tr>
<tr>
<td>Tablet</td>
<td>R$ 900</td>
</tr>
<tr>
<td>Smartwatch</td>
<td>R$ 800</td>
</tr>
<tr>
<td>Fones Bluetooth</td>
<td>R$ 250</td>
</tr>
</tbody>
</table>
<table id="table2" class="ui celled table">
<thead>
<tr>
<th>Funcionário</th>
<th>Departamento</th>
</tr>
</thead>
<tbody>
<tr>
<td>João Silva</td>
<td>TI</td>
</tr>
<tr>
<td>Maria Souza</td>
<td>RH</td>
</tr>
<tr>
<td>Carlos Pereira</td>
<td>Vendas</td>
</tr>
<tr>
<td>Ana Costa</td>
<td>Marketing</td>
</tr>
<tr>
<td>Pedro Rocha</td>
<td>Finanças</td>
</tr>
</tbody>
</table>
<script>
const table1 = new TableNavigator('table1', 'active', 'blue colored left blue marked');
const table2 = new TableNavigator('table2', 'active', 'green colored left green marked');
</script>
</body>
</html>