SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Location
    Taiwan
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Opacity doesn't work on images which were dynamically loaded in IE6

    The following code adjusts the opacity of an image which were dynamically loaded. It works on all browsers except for IE6.

    However, jQuery did apply inline styles "FILTER: alpha(opacity=30); ZOOM: 1" on the image. It just doesn't work.

    Is there a workaround?

    (Attached zip is the HTML page of the following code)

    Code HTML4Strict:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
        <script type="text/javascript">
     
            $(document).ready(function() {
     
                $('<img />')
                .attr({ src: "http://www.sitepoint.com/wp-content/themes/thesis/custom/images/logo.png" })
                .css({ opacity: 0.3 })
                .appendTo('body')
     
            });
     
        </script>
    </head>
    <body>
    </body>
    </html>
    Attached Files Attached Files


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •