Team:TU Delft/test
From 2010.igem.org
(Difference between revisions)
Line 140: | Line 140: | ||
function moveToAnchor(anchor) { | function moveToAnchor(anchor) { | ||
- | var pos = $('# | + | try { |
- | + | var pos = $('#iGEM_TU_Delft_container > a[name='+anchor+']').offset(); | |
- | + | dbgout('anchor: '+anchor+'; pos=' + pos.left + ','+pos.top ); | |
+ | window.scroll(pos.left, pos.top); | ||
+ | } catch (err) { | ||
+ | dbgout('moveToAnchor error: ' + err); | ||
+ | } | ||
} | } | ||
Line 225: | Line 229: | ||
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="); | ||
- | + | // dbgout('rewriting ' + url + ' to ' + this.href); | |
}); | }); | ||
} | } |