-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.dhtml
56 lines (55 loc) · 1.52 KB
/
template.dhtml
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
<html>
<head>
<link rel="stylesheet" type="text/css" href="cid:style.css"></link>
<link rel="stylesheet" type="text/css" href="cid:jquery.ui.tabs.css"></link>
<script type="text/javascript" src="cid:jquery-1.2.3.js"></script>
<script type="text/javascript" src="cid:jquery.ui.tabs.js"></script>
<script type="text/javascript">
$(function() {
$('#tabs > ul').tabs();
function calcOther(node) {
var id = node.get(0).id;
var idx = id.indexOf('-');
var name = id.substring(0, idx);
var nr = id.substring(idx+1, id.length);
var otherName = name == "hex" ? "ascii" : "hex";
return $('#' + otherName + "-" + nr);
}
function doIt(node, active) {
var other = calcOther(node);
var colorStyle = "black";
if (active) {
colorStyle = "red";
}
node.css("color", colorStyle);
other.css("color", colorStyle);
}
$('table.linked td').hover(function() {
doIt($(this), true);
},
function() {
doIt($(this), false);
}
);
});
</script>
</head>
<body>
<div id="tabs">
<ul>
<li><a href="#hex"><span>Hex</span></a></li>
<li><a href="#ascii"><span>Ascii</span></a></li>
</ul>
</div>
<div id="hex">
<div class="center">
<table class="linked">
<tr><td>«hextable»</td><td id="separator" /><td>«asciitable»</td></tr>
</table>
</div>
</div>
<div id="ascii">
«ascii»
</div>
</body>
</html>