Team:TU Delft/pieter/loadtest
From 2010.igem.org
(Difference between revisions)
Line 8: | Line 8: | ||
if(hash) { | if(hash) { | ||
// restore ajax loaded state | // restore ajax loaded state | ||
- | $("#load").load(wgServer+"/Team:TU_Delft/pieter/loadtest/"+hash+"?action=render"); | + | $.get(url, function(data) { |
+ | $("#load").html(data).fadeIn(200); | ||
+ | rewriteLinks($("#load")); | ||
+ | }); | ||
+ | //$("#load").load(wgServer+"/Team:TU_Delft/pieter/loadtest/"+hash+"?action=render"); | ||
} else { | } else { | ||
// start page | // start page | ||
Line 14: | Line 18: | ||
} | } | ||
} | } | ||
+ | |||
+ | function rewriteLinks(elem) { | ||
+ | $("a[href^=/Team:TU_Delft/]", elem).each(function(){ | ||
+ | this.href = this.href.replace("Team:TU_Delft/", wgPageName+ "#/"); | ||
+ | }); | ||
+ | } | ||
+ | |||
$(function() { | $(function() { |
Revision as of 13:04, 21 July 2010
Ajax load
load 1
load 2
load 3
Loaded html: