MediaWiki:Common.js: Difference between revisions

From Wiki Grepolis EN
Jump to navigation
No edit summary
No edit summary
Line 1: Line 1:
  count = 0;
  count = 0;
  function slideshow() {
  function slideshow() {
Line 5: Line 4:
slides = ['one','two','three','four'];
slides = ['one','two','three','four'];
document.getElementById('slideshow').innerHTML = slides[count];
document.getElementById('slideshow').innerHTML = slides[count];
count++;
 
if (count == slides.length)
if (count == slides.length)
{
{
Line 11: Line 10:
}
}
setInterval(slideshow(), 1000);
setInterval(slideshow(), 1000);
count++;
  }
  }
  slideshow();
  slideshow();

Revision as of 20:20, 25 April 2011

 count = 0;
 function slideshow() {
	 
	 slides = ['one','two','three','four'];
	 document.getElementById('slideshow').innerHTML = slides[count];
	 
	 if (count == slides.length)
	 {
		 count = 0;
	 }
	 setInterval(slideshow(), 1000);
count++;
 }
 slideshow();