There is a bug in jQuery attr function in 1.1.3 jQuery code ------------------------- attr: function(elem, name, value){ var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props; // Certain attributes only work when accessed via the old DOM 0 way if ( fix[name] ) { if ( value != undefined ) elem[fix[name]] = value; return elem[fix[name]];
} else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") ) return elem.getAttributeNode(name).nodeValue; // IE elem.getAttribute passes even for style else if ( elem.tagName ) { <--------------------- THE PROBLEM I have checked elem properties and I have all style properties so, I think that elem object is really elem.style and elem.tagName is *undefined* Setting the ticket :P On 7/4/07, mouqx xu <[EMAIL PROTECTED]> wrote:
But in 1.1.2 or below, .css("opacity", 0.5) will be translated to filter: alpha(opacity=50), I wonder why 1.1.3 remove this feature. On 7/4/07, 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 > >
-- -- Greetings SeViR Cartagena, Murcia -Spain- visit my web http://letmehaveblog.blogspot.com