// 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'; } }