Difference between revisions of "Template:Reading2"
Line 52: | Line 52: | ||
function gotopage(address){ | function gotopage(address){ | ||
− | + | window.location.href = 'https://2015.igem.org/Team:Reading' + address; | |
} | } | ||
function buildMenu(){ | function buildMenu(){ | ||
var menuHTML = '.'; | var menuHTML = '.'; | ||
− | menuHTML = ''; | + | menuHTML = ''; |
for(i1 = 0; i1 < pagenames.length; i1++){ | for(i1 = 0; i1 < pagenames.length; i1++){ | ||
if(pagenames[i1].length <= 1){ | if(pagenames[i1].length <= 1){ | ||
− | menuHTML += '<div onclick="gotopage(address['+i1+'][0])" onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width:10%; float:left; text-align:center;"><text style = "line-height: 1em; font-size: 12px; color: #ffffff;text-decoration:none;"></br>' + pagenames[i1][0] + '</text ></div>'; | + | menuHTML += '<div onclick="gotopage(address['+i1+'][0])" onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width:10%; float:left; text-align:center;"><text style = "position:absolute; line-height: 1em; font-size: 12px; color: #ffffff;text-decoration:none;"></br>' + pagenames[i1][0] + '</text ></div>'; |
}else{ | }else{ | ||
− | menuHTML += '<div onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width:10%; float:left; text-align:center;"><text style = "line-height: 1em; font-size: 12px; color: #ffffff;text-decoration:none;"></br>' + pagenames[i1][0] + '</text ></div>'; | + | menuHTML += '<div onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width:10%; float:left; text-align:center;"><text style = "position:absolute; line-height: 1em; font-size: 12px; color: #ffffff;text-decoration:none;"></br>' + pagenames[i1][0] + '</text ></div>'; |
} | } | ||
} | } |
Revision as of 19:00, 12 September 2015