From 2010.igem.org
(Difference between revisions)
|
|
Line 52: |
Line 52: |
| | | |
| // setup hovering | | // setup hovering |
- | var pages = [ "home", "blog", "project", "team", "gallery", "education", "sponsors", "contact" ];
| |
- | 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:04, 21 July 2010