Team:TU Delft/header2

From 2010.igem.org

(Difference between revisions)
Line 54: Line 54:
var pages = [ "home", "blog", "competition", "background", "project", "press", "education", "sponsors" ];
var pages = [ "home", "blog", "competition", "background", "project", "press", "education", "sponsors" ];
for(var i=0; i<pages.length;i++) {
for(var i=0; i<pages.length;i++) {
-
      var page=pages[i];
+
var page=pages[i];
-
  var btnCssClassSelected = "menu_button_" + page + "_sel";
+
var btn= $(".menu_button_" + page);
-
  btn.hover(function() {
+
var btnCssClassSelected = "menu_button_" + page + "_sel";
-
    if (page != activePage)
+
btn.hover(function() {
-
      btn.addClass(btnCssClassSelected);
+
if (page != activePage)
-
  }, function() {
+
btn.addClass(btnCssClassSelected);
-
    if (page != activePage)
+
}, function() {
-
      btn.removeClass(btnCssClassSelected);
+
if (page != activePage)
-
  });
+
btn.removeClass(btnCssClassSelected);
 +
});
-
  btn.addClass("button_pointer");
+
btn.addClass("button_pointer");
-
  if (page == activePage)
+
if (page == activePage)
-
    btn.addClass("menu_button_"+activePage+"_sel");
+
btn.addClass("menu_button_"+activePage+"_sel");
}
}

Revision as of 14:01, 21 July 2010