Team:Brown/templates/header

From 2010.igem.org

(Difference between revisions)
Line 116: Line 116:
{{:Team:Brown/templates/menu}}
{{:Team:Brown/templates/menu}}
<html>
<html>
-
<script>
+
 
 +
<!-- BEGIN Breadcrumbs script from TU Delft -->
 +
<script language="javascript" type="text/javascript">
//Configure the script here
//Configure the script here
var teamname = "Brown";
var teamname = "Brown";
Line 134: Line 136:
var constituentFolders = new Array();
var constituentFolders = new Array();
var currentURL = page;
var currentURL = page;
-
 
// Split the URL
// Split the URL
constituentFolders=currentURL.split("/");
constituentFolders=currentURL.split("/");
-
 
// Start with a link to the team home page
// Start with a link to the team home page
var outputStr="<a href='https://2010.igem.org/Team:'" + teamname + ">Home</a>";
var outputStr="<a href='https://2010.igem.org/Team:'" + teamname + ">Home</a>";
-
 
// Loop through the URL
// Loop through the URL
for (count=0;count<(constituentFolders.length);count++)
for (count=0;count<(constituentFolders.length);count++)
Line 146: Line 145:
outputStr=outputStr + " > <a href='https://2010.igem.org/Team:" + teamname + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
outputStr=outputStr + " > <a href='https://2010.igem.org/Team:" + teamname + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
}
}
-
 
// Write to the div
// Write to the div
$("#breadcrumbs").html(outputStr);
$("#breadcrumbs").html(outputStr);
}
}
-
 
// Capitalize the first letter
// Capitalize the first letter
function capitaliseFirstLetter(string) {
function capitaliseFirstLetter(string) {
     return string.charAt(0).toUpperCase() + string.slice(1);
     return string.charAt(0).toUpperCase() + string.slice(1);
}
}
-
 
// Start the script upon page load
// Start the script upon page load
$(function() {
$(function() {

Revision as of 01:49, 24 October 2010