I just made this code today for a site I'm working on and figured people may try to improve it.
To use:
$("#randomize").randomize();
<!DOCTYPE HTML>
<html>
<head>
<title>Random Pick Test</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
<script type="text/javascript" src="randomize.jQuery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#randomize").randomize({
direction: 'topToBottom',
evenBG: '#FFF',
evenFG: '#000',
oddBG: '#AAA',
oddFG: '#444'
});
});
</script>
</head>
<body>
<div id="randomize">
<span><a href="#1">Child 1</a></span>
<span><a href="#2">Child 2</a></span>
<span><a href="#3">Child 3</a></span>
<span><a href="#4">Child 4</a></span>
<span><a href="#5">Child 5</a></span>
<span><a href="#6">Child 6</a></span>
<span><a href="#7">Child 7</a></span>
<span><a href="#8">Child 8</a></span>
<span><a href="#9">Child 9</a></span>
<span><a href="#10">Child 10</a></span>
</div>
</body>
</html>
/* style.css */
#container {
border: 1px solid #AAA;
box-shadow:1px 0px 3px #444;
width:150px;
height:180px;
white-space:normal;
overflow:hidden;
}
}
#randomize {
padding:10px;
margin:0;
padding:0;
}
#randomize span {
list-style:none;
margin:0;
padding:5px 2px;
display:block;
font-weight:bold;
font-size:22px;
width:auto
}
#randomize span a {
color:inherit;
text-decoration:inherit;
}
.startBtn {
border: 1px solid #AAA;
width: 152px;
box-shadow: 1px 1px 3px #444;
margin: 0px;
padding: 2px;
}