jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes Image Opacity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Image Opacity" Watch "Image Opacity" New topic
Author

Image Opacity

Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
I inherited the following JavaScript method to set the opacity for images in IE. However, apparently if the image does not have an initial style similar to style="filter:alpha(opacity=100)", the code will not work as a result of the if statement on line 8. Is there a way to create an initial style in JavaScript if one does not exists?

Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
The JavaScript code is:
 
Have you checked out Aspose?
 
subject: Image Opacity
 
It's not a secret anymore!