
03-14-2009, 12:42 PM
|
|
|
Join Date: Feb 2009
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by bodaudinh
If you want to variations in your color, you can do follow instruction below:
Edit file rainbow.js:
find Line 44:
Code:
function nickmausac(classname){
var txtValue = "";
var b = getElementsByClassName(classname);
for ( var i = 0; i < b.length; i++ ) {
txtValue = colorText(b[i].innerHTML,1);
b[i].innerHTML = txtValue;
}
}
Change :
Code:
txtValue = colorText(b[i].innerHTML,1);
To (1 => i):
Code:
txtValue = colorText(b[i].innerHTML,i);
Result:
Code:
function nickmausac(classname){
var txtValue = "";
var b = getElementsByClassName(classname);
for ( var i = 0; i < b.length; i++ ) {
txtValue = colorText(b[i].innerHTML,i);
b[i].innerHTML = txtValue;
}
}
|
works like a charm
|