forked from renjujv/testsigma-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script2.js
56 lines (41 loc) · 1.36 KB
/
script2.js
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
/* function myFunction() {
var txt;
if (confirm("Press a button!")) {
txt = "Alert accepted";
} else {
txt = "Alert dismissed";
}
document.getElementById("Alertbtn").innerHTML = txt;
}
function onChange(){
document.getElementById("id").setAttribute("id","afterclick");
}
function double(){
document.getElementById("dbclick").innerHTML="doubleclick is Done";
}
document.getElementById("date").innerHTML = Date(); */
/* Set the width of the side navigation to 250px */
function changetabcontent(evt, menuItemName){
var i, tabcontent, menuitems;
menuitems = document.getElementsByClassName("menu-items");
tabcontent = document.getElementsByClassName("tabcontent");
//Hide all tabs
for(i=0; i<tabcontent.length; i++){
tabcontent[i].style.display="none";
}
//Hide all menuitems
for(i=0; i<menuitems.length; i++){
menuitems[i].className.replace("menu-items active","menu-items");
}
//Show current item
document.getElementById(menuItemName).style.display = 'block';
evt.currentTarget.className += " active";
}
/* Set the width of the side navigation to 0 */
// function closeNav(closebutton) {
// }
function launch_toast() {
var x = document.getElementById("toast")
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 2000);
}