2013-09-02, 06:27 AM
ok i have found this thing while messing around on google and i have been trying to get it to work with what i want it to do but i cant seem to figure it out and figured would post it here and see if someone could help me out
so there is that and here is something from jsfiddle
http://jsfiddle.net/DZpyw/49/
and here is this one
http://jsfiddle.net/DZpyw/49/show/
but i cant seem to get it to work
what i am trying to do with it is make it work with the name color of a usergroup
<span id="example">Multi color me</span>
$(document).ready(function() {
var test = $("#example").text().split('');
var result = "";
var i = 0;
for(i=0; i < test.length; i++) {
result += "<span style='color:"+getColor()+"'>"+test[i]+"</span>";
}
$("#example").html(result);
});
function getColor() {
var colList = ['#ff00ee', '#ffffff','#00ff00'];
var i = Math.floor((Math.random()*colList.length));
return colList[i];
}
so there is that and here is something from jsfiddle
http://jsfiddle.net/DZpyw/49/
and here is this one
http://jsfiddle.net/DZpyw/49/show/
but i cant seem to get it to work
what i am trying to do with it is make it work with the name color of a usergroup