Template:Team:Hannover/main.tmpl
From 2014.igem.org
(Difference between revisions)
Line 28: | Line 28: | ||
var menu_currentPage = 'ANY'; | var menu_currentPage = 'ANY'; | ||
+ | |||
+ | var pageMap = { | ||
+ | 'HOME' : 'https://static.igem.org/mediawiki/2014/c/ce/Hannover_20140831_MENU-HOME.png', | ||
+ | 'TEAM' : 'https://static.igem.org/mediawiki/2014/2/25/Hannover_20140831_MENU-TEAM.png', | ||
+ | 'PROJECT' : 'https://static.igem.org/mediawiki/2014/b/b0/Hannover_20140831_MENU-PROJECT.png', | ||
+ | 'HUMAN-PRACTICE' : 'https://static.igem.org/mediawiki/2014/d/dc/Hannover_20140831_MENU-HUMAN-PRACTICE.png' | ||
+ | } | ||
function menu_beginsWithLower(needle, haystack){ | function menu_beginsWithLower(needle, haystack){ | ||
Line 46: | Line 53: | ||
menu_currentPage= 'TEAM'; | menu_currentPage= 'TEAM'; | ||
} | } | ||
- | menu_image_src = | + | var menu_image_src = pageMap[currentPage]; |
$('#menu_image').attr('src', menu_image_src); | $('#menu_image').attr('src', menu_image_src); | ||
- | |||
} | } | ||
function menu_onMouseOut() { | function menu_onMouseOut() { | ||
- | menu_image_src = | + | var menu_image_src = pageMap[currentPage]; |
$('#menu_image').attr('src', menu_image_src); | $('#menu_image').attr('src', menu_image_src); | ||
} | } | ||
function menu_onMouseOver(menu_item) { | function menu_onMouseOver(menu_item) { | ||
- | menu_image_src = | + | var menu_image_src = pageMap[menu_item]; |
$('#menu_image').attr('src', menu_image_src); | $('#menu_image').attr('src', menu_image_src); | ||
} | } |
Revision as of 20:11, 31 August 2014