Darkijah | test | 08:56 |
---|---|---|
Darkijah | anyone knows Javascript? | 13:59 |
Darkijah | I need a loop command..... | 13:59 |
Darkijah | of some kind | 13:59 |
Darkijah | var listItems = document.getElementsByClassName('color'); var colors = ["#ff0000", "#ff940d", "#e5ff00", "#00ff00", "#25c7ef", "#364aff", "#ba00ff" | 14:00 |
Darkijah | ]; for(var i = 0; i < colors.length; i ++) { listItems[i].style.color = colors[i]; } | 14:00 |
Darkijah | I need something that redo's the colors | 14:00 |
b100dian[m] | What is the problem, indexing the listitems? | 17:37 |
direc85[m] | Try something like: listItems[i].style.color = colors[i % colors.length]; | 18:36 |
direc85[m] | 3 minutes too late, it seems :] | 18:37 |
b100dian[m] | He'll get that from the logs. It's easier to discuss code, ain't it. | 19:30 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!