server/www/screen.js

13 lines
249 B
JavaScript

function Screen() {
var current = document.querySelector("body > div.on");
return {
select: select
};
function select(name) {
current.className = "";
current = document.getElementById(name);
current.className = "on";
}
}