Last active
December 22, 2016 18:15
-
-
Save bytefade/16910a58883c43638fc54b566be6225f to your computer and use it in GitHub Desktop.
Colorindo infinitamente alguma class, titulo e etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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