Code du site
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

function setDisplay(classname, display) {
var elements = document.getElementsByClassName(classname);
for(i=0;i<elements.length;i++) {
elements[i].style.display = display;
function submenu() {
setDisplay("mainmenu", "none");
setDisplay("submenu", "inline");
function mainmenu() {
setDisplay("mainmenu", "inline");
setDisplay("submenu", "none");
<a class="mainmenu" href="/"><img src="/icon/icon_red.svg" style="height:0.8em;"/>Accueil</a>
<a class="mainmenu" href="{{ get_url(path="@/") }}">Messagerie</a>
<a class="mainmenu" href=""><img src="/icon/external_link_red.png" style="height:0.7em;"/> Agenda</a>
<a class="mainmenu" href="#" onclick="submenu()"></a>
<a class="submenu" href="{{ get_url(path="@/") }}">Réseau</a>
<a class="submenu" href="{{ get_url(path="@/documents/") }}">Documents</a>
<a class="submenu" href="{{ get_url(path="@/actus/") }}">Blog</a>
<a class="submenu" href="#" onclick="mainmenu()"></a>
.submenu {
display: none;