22 lines
454 B
JavaScript
22 lines
454 B
JavaScript
|
|
// Main JavaScript code goes here.
|
||
|
|
|
||
|
|
var state = 'hello';
|
||
|
|
|
||
|
|
function toggle()
|
||
|
|
{
|
||
|
|
var helloElem = document.getElementById("hello");
|
||
|
|
var hello_againElem = document.getElementById("hello_again");
|
||
|
|
|
||
|
|
if(state == 'hello')
|
||
|
|
{
|
||
|
|
helloElem.style.display = 'none';
|
||
|
|
hello_againElem.style.display = 'block';
|
||
|
|
state='hello_again';
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
helloElem.style.display = 'block';
|
||
|
|
hello_againElem.style.display = 'none';
|
||
|
|
state='hello';
|
||
|
|
}
|
||
|
|
}
|