javascript only works in codepen code example
Example: javascript only works in codepen
if(document.readyState == "complete" || document.addEventListener){
//Place all of your code here
}
if(document.readyState == "complete" || document.addEventListener){
//Place all of your code here
}