Team:TU Delft/header2
From 2010.igem.org
(Difference between revisions)
Line 42: | Line 42: | ||
if(activePage == "home") { | if(activePage == "home") { | ||
$.history.load("page=pages/home"); | $.history.load("page=pages/home"); | ||
- | + | // rewriteLinks($("#load")); | |
} | } | ||
Line 103: | Line 103: | ||
function rewriteLinks(elem) { | function rewriteLinks(elem) { | ||
- | alert('rewriting links'); | + | alert('rewriting links'); |
$("a",elem).each(function() { | $("a",elem).each(function() { | ||
var txt = $(this).text(); | var txt = $(this).text(); | ||
- | if(this.href. | + | if(this.href.split('#').length == 2) |
- | this.href = '#anchor=' + | + | this.href = '#anchor=' + this.href.substring(1); |
else if(txt != "edit") | else if(txt != "edit") | ||
this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page="); | this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page="); |
Revision as of 12:45, 22 July 2010