Created
September 13, 2014 20:10
-
-
Save a2f0/5d8309046e5ec1ae55dd to your computer and use it in GitHub Desktop.
javascript star code
This file contains 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
<script>//<![CDATA[ | |
window.addEventListener("load", configRainbow, false); | |
function configRainbow() { | |
var x=document.getElementById("rainy"); | |
var bigstar; | |
if (x.contentDocument) { | |
var star1 = x.contentDocument.getElementById("star1"); | |
var star2 = x.contentDocument.getElementById("star2"); | |
var star3 = x.contentDocument.getElementById("star3"); | |
var star4 = x.contentDocument.getElementById("star4"); | |
//star1.setAttribute("stroke", "lime"); | |
//star2.setAttribute("stroke", "magenta"); | |
//star3.setAttribute("stroke", "aqua"); | |
//star4.setAttribute("stroke", "yellow"); | |
star1.setAttribute("stroke", "black"); | |
star2.setAttribute("stroke", "black"); | |
star3.setAttribute("stroke", "black"); | |
star4.setAttribute("stroke", "black"); | |
star1.setAttribute("fill", "#000000"); | |
star2.setAttribute("fill", "#333333"); | |
star3.setAttribute("fill", "#666666"); | |
star4.setAttribute("fill", "#b3b3b3"); | |
rainy.style.visibility = "visible"; | |
console.log("Finished selecting"); | |
} | |
return; | |
} | |
//]]> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment