Reputation: 39055
For Internet Explorer opacity is set in inline css like this:
style="filter: alpha(opacity=50);"
What I'd like to do is get the opacity value as in integer in javascript. Ok I guess I can get the whole string and parse out the int, but is there a faster/better way?
Thanks
Upvotes: 0
Views: 4600
Reputation: 26380
The JavaScript is pretty simple:
var opacity = this.filters.alpha.opacity;
or if you have an id...
var opacity = getElementById('myelement').filters.alpha.opacity;
Upvotes: 4