Difference between revisions of "Template:ETH Zurich"

m
m
Line 16: Line 16:
 
var menu = document.getElementById('sidemenu');
 
var menu = document.getElementById('sidemenu');
 
var items = $("#contentContainer h1,h2,h3,h4,h5,h6");
 
var items = $("#contentContainer h1,h2,h3,h4,h5,h6");
 +
var menuText = "";
 +
 
if (items.length > 2) {
 
if (items.length > 2) {
 
var cur = 0,next=0,count=0;
 
var cur = 0,next=0,count=0;
var menuText = "";
 
 
for (i=1; i<items.length; i++) {
 
for (i=1; i<items.length; i++) {
 
next = parseInt(items[i].tagName.substring(1,2));
 
next = parseInt(items[i].tagName.substring(1,2));
Line 44: Line 45:
 
count = count - 1;
 
count = count - 1;
 
}
 
}
menuText = menuText.concat("<br><i>\"What I cannot create I do not understand.\"</i><br> - Richard Feynmann");
 
menu.innerHTML += menuText;
 
  
 
}
 
}
 +
if (menuText == "") {
 +
menuText = menuText.concat("<br><i>\"What I cannot create I do not understand.\"</i><br> - Richard Feynmann");
 +
}
 +
menu.innerHTML += menuText;
 
menu.style.display = "block";
 
menu.style.display = "block";
  

Revision as of 12:39, 19 August 2015

We would like to thank our sponsors