Team:TU Delft/header2

From 2010.igem.org

(Difference between revisions)
Line 34: Line 34:
var activePage = "</html>{{{contentpage|home}}}<html>";
var activePage = "</html>{{{contentpage|home}}}<html>";
 +
//On page load this function is called
 +
$(function() {
 +
// Initialize history plugin.
 +
$.history.init(pageload);
 +
 +
// set onlick event for menu buttons
 +
$("a.menu_button").click(function(){
 +
//
 +
var hash = this.href;
 +
hash = hash.replace(/^.*#/, '');
 +
// moves to a new page.
 +
// pageload is called at once.
 +
$.history.load(hash);
 +
return false;
 +
});
 +
});
</script>
</script>

Revision as of 13:54, 21 July 2010