MediaWiki:Common.js: Difference between revisions
Jump to navigation
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
count = 0; | |||
function slideshow() { | function slideshow() { | ||
slides = ['one','two','three','four']; | slides = ['one','two','three','four']; | ||
document.getElementById('slideshow').innerHTML = slides[count]; | alert(document.getElementById('slideshow').innerHTML); | ||
//document.getElementById('slideshow').innerHTML = slides[count]; | |||
if (count == slides.length) | if (count == slides.length) | ||
Line 9: | Line 10: | ||
count = 0; | count = 0; | ||
} | } | ||
setTimeout(slideshow(), 1000); | |||
count++; | count++; | ||
} | } | ||
slideshow(); | slideshow(); |
Revision as of 20:28, 25 April 2011
count = 0; function slideshow() { slides = ['one','two','three','four']; alert(document.getElementById('slideshow').innerHTML); //document.getElementById('slideshow').innerHTML = slides[count]; if (count == slides.length) { count = 0; } setTimeout(slideshow(), 1000); count++; } slideshow();