1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-09-30 00:43:44 +02:00
crowbook/templates/script.js
Elisabeth Henry f42ace238c Add html.script option to specify javascript file to use
Also, various templates use this value instead of hard-coding the
javascript code (and duplicating it three times).
2016-03-06 02:35:11 +01:00

15 lines
533 B
JavaScript

var display_menu = false;
function toggle() {
if (display_menu == true) {
display_menu = false;
document.getElementById("nav").style.left = "-20%";
document.getElementById("content").style.marginLeft = "10%";
document.getElementById("menu").style.left = "1em";
} else {
display_menu = true;
document.getElementById("nav").style.left = "0";
document.getElementById("content").style.marginLeft = "30%";
document.getElementById("menu").style.left = "20%";
}
}