I have three classes with three different colors.
How can I swap the background-colors
randomly every page visit?
.projects{background:#99c6c3;}
.other-things{background:#d3d3d3;}
.about {background:#eedd8d;}
I tried to use this js :
var bgcolorlist=new Array("#99c6c3", "#d3d3d3", "#eedd8d")
$(".projects").css("background-color",bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]);
But I don't want two colors to be the same.