Team:TU Delft/menu test

From 2010.igem.org

(Difference between revisions)
Line 71: Line 71:
function registerButton(btnName) {
function registerButton(btnName) {
   var btn= $(".menu_button_" + btnName);
   var btn= $(".menu_button_" + btnName);
-
   btn.click(function() { alert(btnName); });
+
  var page = "https://2010.igem.org/Team:TU_Delft/pages/" + btnName + "?action=render";
 +
   btn.click(function() {  
 +
    $("#main_td").load(page);
 +
  });
 +
 
 +
  // setup hovering
 +
  btn.hover(function() {
 +
    btn.addClass("button_hover");
 +
  }, function() {
 +
    btn.removeClass("button_hover");
 +
  });
 +
 
 +
  btn.addClass("button_pointer");
}
}

Revision as of 22:20, 4 June 2010