Randomly Displayed Content Using CSS and JavaScript

This script takes an unordered list and randomly displays one item on each page load (reload to test).

Did you know that...

The Script

this.randomtip = function(){
	var length = $("#tips li").length;
	var ran = Math.floor(Math.random()*length) + 1;
	$("#tips li:nth-child(" + ran + ")").show();


Go back to the article

This script is supported by Css Templates by Templatica