forked from JMante1/jet-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToggle_Switch_html.txt
More file actions
39 lines (31 loc) · 937 Bytes
/
Toggle_Switch_html.txt
File metadata and controls
39 lines (31 loc) · 937 Bytes
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
<html>
<body>
<input type="checkbox" name="type" id="bytype" /><label for="bytype">Type Matters</label>
<div id="type">
<h2>By type</h2>
</div>
<div id="notype">
<h2>Frequency</h2>
</div>
<script type="text/javascript">
document.getElementById('type').style.display = 'none';
document.getElementById('notype').style.display = 'block';
var inputs = document.getElementsByTagName('input');
function dispp() {
if (bytype.checked) {
document.getElementById('type').style.display = 'block';
document.getElementById('notype').style.display = 'none';
}
else {
document.getElementById('type').style.display = 'none';
document.getElementById('notype').style.display = 'block';
}
}
for (i = 0; i < inputs.length; i++) {
if (inputs[i].type.toLowerCase() == 'checkbox') {
inputs[i].onchange = dispp;
}
}
</script>
</body>
</html>