While it doesn't exist as a CSS property in IE 6, you used to be able
to do $("#foo").css("opacity","0.8") and it would still apply the
opacity the the element(s) it was applied to.

On Jul 4, 10:13 am, SeViR <[EMAIL PROTECTED]> wrote:
> In IE 6 CSS opacity doesn't exists, you must use
>
> filter:alpha(opacity=50)
>
> so
>
> $("<div>").css({filter:"alpha(opacity=50)"});  //Only in browser <= IE6
>
> or better
>
> $("<div>").fadeTo("fast", 0.5, function(){
>   alert("Animation Done.");
>
> });  //cross-platform opacity
>
> mouqx xu escribió:
>
>
>
>
>
> > following is a simple, the opacity does not works in IE6.0.
> > Is this a bug, or should I use other expressions?
> > <html>
> > <head>
> > <script type="text/javascript" src="/js/jquery/jquery-1.1.3.js"></script>
> > <!--<script type="text/javascript"
> > src="/js/jquery/jquery-1.1.2.js"></script>--><!-- this works-->
> > <script>
> > function test(){
> >    $("<div>").css({
> >           position: "absolute",
> >           top: 0,
> >           left: 0,
> >           opacity: 0.5,
> >           width: 100,
> >           height: 100,
> >          backgroundColor:  "red"})
> >    .appendTo(document.body).text("hihi")
> > }
> > $(test)
> > </script>
> > <style type="text/css">
> > #test{
> >    position: relative;
> >    width: 400px;
> >    height: 400px;
> >    border: 1px solid green;
> >    background-color: blue;
> > }
> > </style>
> > </head>
> > <body>
> > <div id="test">asdfasdfasdfa</div>
> > </body>
> > </html>
>
> --
> Best Regards,
>  José Francisco Rives Lirola <sevir1ATgmail.com>
>
>  SeViR CW · Computer Design
>  http://www.sevir.org
>
>  Murcia - Spain

Reply via email to