What would I need to add to the code below to have the random redirect timeout for 5 seconds before triggering?

<script type="text/javascript">
 var pages = ['http://www.thestormybrain.com/2013/11/malcolm-gladwell-choice-happiness-and.html', 'http://www.thestormybrain.com/2013/11/steve-jobs-how-to-live-before-you-die.html', 'http://www.thestormybrain.com/2013/11/david-blaine-how-i-held-my-breath-for.html'];
 n = n < 3? 0 : n < 8? 1 : 2;
})(Math.floor(Math.random() * 10));

I know what a regular redirect looks like, but I don't know where to place it within this special array.

<script type="text/JavaScript">
setTimeout("location.href = 'http://www.yourURL.com';",1500);

Thanks for any help you're able to provide!

Votes + Comments
Why you double post?
4 Years
Discussion Span
Last Post by jonsan32

Thanks for any help you're able to provide!


Isn't there someone who already help you with this?

Edited by LastMitch


No. No one helped.

I wasn't helped with the first, but found some extra info in the meantime. I was going to merely edit the first instead, but thought the lack of response was due to my lack of donation. So I opted to post again in order to donate to this great site. If no one knows the answer, it's ok. I've received more than my share of help from all of you. Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.