Random background colour
by sambaldwin
HTML
<div>
</div>
CSS
div {
height:400px;
width:400px;
}
JavaScript
RandomColor = function() {
colors = ['rgba(88,89,91,0.85)', 'rgba(165,160,156,0.85)', 'rgba(169,163,161,0.85)', 'rgba(226,224,223,0.85)', 'rgba(197,199,200,0.85)']
return colors[Math.floor(Math.random()*colors.length)];
}
$("div").css("background-color", RandomColor);