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); }); | btn.click(function() { alert(btnName); }); | ||
} | } | ||
Line 79: | Line 77: | ||
$(function() { | $(function() { | ||
var buttonList = [ "home", "blog", "competition", "background", "project", "education", "sponsors", "press" ]; | var buttonList = [ "home", "blog", "competition", "background", "project", "education", "sponsors", "press" ]; | ||
- | for(var | + | for(var i in buttonList) |
- | registerButton( | + | registerButton(buttonList[i]); |
- | + | ||
}); | }); | ||
Revision as of 22:16, 4 June 2010