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 btn= $(".menu_button_" + page); | |
- | + | var btnCssClassSelected = "menu_button_" + page + "_sel"; | |
- | + | btn.hover(function() { | |
- | + | if (page != activePage) | |
- | + | btn.addClass(btnCssClassSelected); | |
- | + | }, function() { | |
- | + | if (page != activePage) | |
- | + | btn.removeClass(btnCssClassSelected); | |
+ | }); | ||
- | + | btn.addClass("button_pointer"); | |
- | + | if (page == activePage) | |
- | + | btn.addClass("menu_button_"+activePage+"_sel"); | |
} | } | ||
Revision as of 14:01, 21 July 2010