Skip to content

Instantly share code, notes, and snippets.

@bytefade
Last active December 22, 2016 18:15
Show Gist options
  • Save bytefade/16910a58883c43638fc54b566be6225f to your computer and use it in GitHub Desktop.
Save bytefade/16910a58883c43638fc54b566be6225f to your computer and use it in GitHub Desktop.
Colorindo infinitamente alguma class, titulo e etc.
var css = document.getElementsByClassName("esg-click-to-play-video");
var y = 0;
var x = 0;
function colority() {
if (css[x] != null) {
css[x].style.background = cores[y];
}
x++;
y++;
if (y > cores.length) {
y = 0;
}
if (x > css.length) {
x = 0;
}
setTimeout(colority, 15);
}
colority();
var css = document.getElementsByClassName("esg-click-to-play-video");
var y = 0;
for (x = 0; x < css.length; x++) {
css[x].style.backgroundColor = cores[y];
y++;
if(y > cores.length){
y=0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment