nicky
08-26-2010, 09:56 PM
I'm in search for a simple and clean timed rotation script. I have these quotes, and right now they're coded so that a single quote displays and changes upon refresh. The script is really clean, and I would like to maintain the cleanliness but make the images rotate every couple of seconds. Here's the script...
<script type="text/javascript">
quote = new Array(3);
quote[0] = "Quote 1";
quote[1] = "Quote 2";
quote[2] = "Quote 3";
index = Math.floor(Math.random() * quote.length);
document.write(quote[index]);
</script>
It's probably a really simple piece of coding, but I'm still new to JavaScript, so it's obviously out of my range. I appreciate anyone who will help ;)
<script type="text/javascript">
quote = new Array(3);
quote[0] = "Quote 1";
quote[1] = "Quote 2";
quote[2] = "Quote 3";
index = Math.floor(Math.random() * quote.length);
document.write(quote[index]);
</script>
It's probably a really simple piece of coding, but I'm still new to JavaScript, so it's obviously out of my range. I appreciate anyone who will help ;)