Team:KAIST-Korea/jihanmenu

From 2011.igem.org

(Difference between revisions)
Line 3: Line 3:
<head><!-- saved from url=(0014)about:internet -->
<head><!-- saved from url=(0014)about:internet -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
 +
 +
<script>
 +
//Configure the script here
 +
var teamname = "KAIST-Korea";
 +
 +
// Do not edit below
 +
 +
// Loop through the URL
 +
function buildDepth(array,count) {
 +
var depthStr="";
 +
for (i=0;i<count;i++)
 +
{
 +
depthStr=depthStr + array[i] + "/" ;
 +
}
 +
return depthStr;
 +
}
 +
 +
// The function
 +
function buildBreadCrumbTrail(page) {
 +
// Declare vars
 +
var constituentFolders = new Array();
 +
var currentURL = page;
 +
 +
// Split the URL
 +
constituentFolders=currentURL.split("/");
 +
 +
// Start with a link to the team home page
 +
var outputStr="<a href='https://2011.igem.org/Team:'" + teamname + ">Home</a>";
 +
 +
// Loop through the URL
 +
for (count=0;count<(constituentFolders.length);count++)
 +
{
 +
outputStr=outputStr + " > <a href='https://2011.igem.org/Team:" + teamname +
 +
buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" +
 +
capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
 +
}
 +
 +
// Write to the div
 +
$("#breadcrumbs").html(outputStr);
 +
}
 +
 +
// Capitalize the first letter
 +
function capitaliseFirstLetter(string) {
 +
    return string.charAt(0).toUpperCase() + string.slice(1);
 +
}
 +
 +
// Start the script upon page load
 +
$(function() {
 +
buildBreadCrumbTrail(window.location.pathname);
 +
}
 +
</script>
<style type="text/css">
<style type="text/css">
Line 201: Line 252:
</div>
</div>
-
<script>
 
-
//Configure the script here
 
-
var teamname = "KAIST-Korea";
 
-
 
-
// Do not edit below
 
-
 
-
// Loop through the URL
 
-
function buildDepth(array,count) {
 
-
var depthStr="";
 
-
for (i=0;i<count;i++)
 
-
{
 
-
depthStr=depthStr + array[i] + "/" ;
 
-
}
 
-
return depthStr;
 
-
}
 
-
 
-
// The function
 
-
function buildBreadCrumbTrail(page) {
 
-
// Declare vars
 
-
var constituentFolders = new Array();
 
-
var currentURL = page;
 
-
 
-
// Split the URL
 
-
constituentFolders=currentURL.split("/");
 
-
 
-
// Start with a link to the team home page
 
-
var outputStr="<a href='https://2011.igem.org/Team:'" + teamname + ">Home</a>";
 
-
 
-
// Loop through the URL
 
-
for (count=0;count<(constituentFolders.length);count++)
 
-
{
 
-
outputStr=outputStr + " > <a href='https://2011.igem.org/Team:" + teamname +
 
-
buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" +
 
-
capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
 
-
}
 
-
 
-
// Write to the div
 
-
$("#breadcrumbs").html(outputStr);
 
-
}
 
-
 
-
// Capitalize the first letter
 
-
function capitaliseFirstLetter(string) {
 
-
    return string.charAt(0).toUpperCase() + string.slice(1);
 
-
}
 
-
 
-
// Start the script upon page load
 
-
$(function() {
 
-
buildBreadCrumbTrail(window.location.pathname);
 
-
}
 
-
</script>
 
<div id="breadcrumbs">The breadcrumbs will show up in this div</div>
<div id="breadcrumbs">The breadcrumbs will show up in this div</div>

Revision as of 08:50, 7 August 2011