If I have:
#em {
  opacity:0.5;
}
How do I get #em's opacity using javascript? :D
I've got troubles with the following (it returns nothing):
return document.getElementById("em").style.opacity;
                var em = document.getElementById("em");
var  temp = window.getComputedStyle(em).getPropertyValue("opacity");
Now, the variable temp will have the value of opacity of "em".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With