I have an element on my page that has different styles if the user is hovering over it or clicking it. Normally, the image is a snowflake. When the mouse is over it, the snowflake image is replaced with the same snowflake glowing blue, and when it's active, the image is replaced with the same glowing snowflake, but slightly smaller. This creates the illusion that the snowflake glows when hovered, and shrinks when the mouse is clicked.
However, I want to make it so the snowflake changes its look depending on the score. This is what I have for that:
var snowflakeBG = document.getElementById("MainSnowFlake");
changeFlakeImage = function(){
if (mainScore >= 100){
snowflakeBG.style.backgroundImage = "url(Images/Snowflake100BG.png)";
}
This works just fine to replace the normal snowflake with the "snowflake100BG" once the user's score reaches 100. The problem is, I don't know how to also change the elements :hover and :active. Could someone please explain?