14 lines
249 B
JavaScript
14 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";
|
||
|
}
|
||
|
}
|