-
Notifications
You must be signed in to change notification settings - Fork 0
/
_toggle.html
executable file
·41 lines (37 loc) · 1.42 KB
/
_toggle.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
<script language="javascript">
function toggle(id) {
var ele = document.getElementById("toggleText" + id);
var text = document.getElementById("displayText" + id);
var buttonText = text.innerHTML.replace("Show ", "");
buttonText = buttonText.replace("Hide ", "");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "Show " + buttonText;
} else {
ele.style.display = "block";
text.innerHTML = "Hide " + buttonText;
}
}
</script>
<script language="javascript">
function openCode(evt, codeName, id) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent" + id);
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks" + id);
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(codeName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
<script language="javascript">
function hide(id){
document.getElementById(id).style.display = "none";
}
</script>
</script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">