Team:TU Delft/header2

From 2010.igem.org

(Difference between revisions)
Line 32: Line 32:
<script type="text/javascript">
<script type="text/javascript">
//Global Vars
//Global Vars
 +
var activePage;
// Set document ready callback
// Set document ready callback
Line 67: Line 68:
function loadPage(page)
function loadPage(page)
{
{
 +
activePage = page;
var url = wgServer + "/Team:TU_Delft/" + page + "?action=render";
var url = wgServer + "/Team:TU_Delft/" + page + "?action=render";
$("#load").fadeOut(200);
$("#load").fadeOut(200);
Line 86: Line 88:
if(hash.split('=').length > 1) {
if(hash.split('=').length > 1) {
    var kvmap = splitHash(hash);
    var kvmap = splitHash(hash);
-
if (kvmap.page) {
+
if (kvmap.page && kvmap.page != activePage) {
loadPage(kvmap.page);
loadPage(kvmap.page);
-
}
+
} else
 +
$(window).trigger('hashupdate', [ kvmap ]);
}
}
} else {
} else {

Revision as of 21:44, 22 July 2010