Hi Guys,

Not sure if anyone can help but I've got a small piece of code that changes a piece of text its a URL and it first says "New Product" then "Product Name" this works in all browsers at current but IE crashes and says the page took to long to load.

Anyone got any tips or advice on how I can make this work in IE?

HTML Code:
<script type="text/javascript">

this.randomtip = function(){

	var pause = 2000; // define the pause for each tip (in milliseconds) Feel free to make the pause longer so users can have time to read the tips :)
	var length = $("#tips li").length; 
	var temp = -1;		

	this.getRan = function(){
		// get the random number
		var ran = Math.floor(Math.random()*length) + 1;
		return ran;
	this.show = function(){
		var ran = getRan();
		// to avoid repeating tips we need to check 
		while (ran == temp){
			ran = getRan();
		temp = ran;
		$("#tips li").hide();	
		$("#tips li:nth-child(" + ran + ")").fadeIn("fast");		
	// initiate the script and also set an interval
	show(); setInterval(show,pause);

HTML Code:

#tips, #tips li{
#tips li{
	display:none; /* hide the items at first only to display one with javascript */

HTML Code:
	<ul id="tips">
		<li><a href="#">New Product</a></li>
		<li><a href="#">Product Name</a></li>
Cheers In advance.