John, Awesome! I figured it was something simple like that. Thank you for all your hard work. Because of the work you and others like you do, my job is much easier. jQuery in particular, has changed the way I think about and design web sites. Before jQuery, I rarely touched Javascript; but now, I'm confidently scripting like never before!
-Isaac -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Resig Sent: Wednesday, September 06, 2006 3:47 PM To: jQuery Discussion. Subject: Re: [jQuery] Bug with .css('z-index', '2') Not ;-) Your particular example won't work with CSS property inheritance. It's really as simple as converting all foo-bar strings to fooBar (in the backend) - nothing more than that. This is a known bug and listed in the bug tracker - I'm just getting around to fixing it. --John > my idea: I'll change the css() function, so you can supply the correct css > definition or the javascript attribute, i.e: > > $().css("zIndex", "2") > And > $().css("z-index", "2") > > will do the same. This is achieved by doing the following on the second > method: > > 1) First, try to read the attribute from DOMelement.z-index, if this returns > null, then > 2) get the style string via DOMelement.getAttribute("style"), which returns > the proper css definitions, > 3) split into array via split(";") > 4) if z-index is found, change it and merge the array again, then do > setAttribute("style", mergedArray) > 5) if z-index is not found, add it to the array, merge it and to the same. > > Cool or not? _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/