Difference between revisions of "Team:ETH Zurich/homeSlideshow"
Line 6: | Line 6: | ||
document.getElementById('mainState2'), | document.getElementById('mainState2'), | ||
document.getElementById('mainState3'), | document.getElementById('mainState3'), | ||
− | document.getElementById('mainState4') | + | document.getElementById('mainState4'), |
+ | document.getElementById('mainState5') | ||
]; | ]; | ||
var homeMainCaptions = [ | var homeMainCaptions = [ | ||
Line 13: | Line 14: | ||
"<p>Caption3</p>", | "<p>Caption3</p>", | ||
"<p>Caption4</p>", | "<p>Caption4</p>", | ||
− | "<p>Caption5</p>" | + | "<p>Caption5</p>", |
+ | "<p>Caption6</p>" | ||
+ | ]; | ||
+ | var homeMainImages = [ | ||
+ | "https://static.igem.org/mediawiki/2015/2/26/ETH_homepage_slideshow.png", | ||
+ | "https://static.igem.org/mediawiki/2015/6/64/ETH_homepage_slideshow2.png", | ||
+ | "https://static.igem.org/mediawiki/2015/6/64/ETH_homepage_slideshow2.png", | ||
+ | "https://static.igem.org/mediawiki/2015/6/64/ETH_homepage_slideshow2.png", | ||
+ | "https://static.igem.org/mediawiki/2015/6/64/ETH_homepage_slideshow2.png", | ||
+ | "https://static.igem.org/mediawiki/2015/6/64/ETH_homepage_slideshow2.png" | ||
]; | ]; | ||
var curMainState = 0; | var curMainState = 0; | ||
Line 45: | Line 55: | ||
curMainState += dir; | curMainState += dir; | ||
document.getElementById('homeMainCaption').innerHTML = homeMainCaptions[curMainState]; | document.getElementById('homeMainCaption').innerHTML = homeMainCaptions[curMainState]; | ||
+ | document.getElementById('homepageImg').src = homeMainImages[curMainState]; | ||
setTimeout(function(){document.getElementById('homeMainContainer').className = "content";},700); | setTimeout(function(){document.getElementById('homeMainContainer').className = "content";},700); | ||
} | } |
Revision as of 13:38, 17 September 2015