init state
This commit is contained in:
parent
a90c35451f
commit
5de5ed9f1a
@ -31,14 +31,18 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||||||
//check for new messages every 7 seconds
|
//check for new messages every 7 seconds
|
||||||
window.setInterval( update, 7000 );
|
window.setInterval( update, 7000 );
|
||||||
|
|
||||||
addButtonListeners();
|
initState();
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* STATE CHANGES
|
* STATE CHANGES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addButtonListeners(){
|
function initState(){
|
||||||
|
document.getElementById('photo-page').style.display = "none";
|
||||||
|
document.getElementById('overview-page').style.display = "block";
|
||||||
|
document.getElementById('message-page').style.display = "none";
|
||||||
|
|
||||||
document.getElementById('new-photo').onclick = onNewPhoto;
|
document.getElementById('new-photo').onclick = onNewPhoto;
|
||||||
document.getElementById('new-message').onclick = onNewMessage;
|
document.getElementById('new-message').onclick = onNewMessage;
|
||||||
document.getElementById('message-back').onclick = onBack;
|
document.getElementById('message-back').onclick = onBack;
|
||||||
|
Loading…
Reference in New Issue
Block a user