Hi there,

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?

Paul 

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Michael Geary
Gesendet: Mittwoch, 6. September 2006 20:41
An: 'jQuery Discussion.'
Betreff: Re: [jQuery] Bug with .css('z-index', '2')

> > From: Dylan Verheul
> > Actually, in DOM terms, zIndex is the only correct name. 

> From: aedmonds
> Right... but for CSS properties I believe z-index is the only correct 
> name for the zIndex property. Maybe I'm wrong but do know you set 
> zIndex by using
> 
> p { z-index: 2; }
> 
> I guess I've really never tried
> 
> p { zIndex: 2; }

Nor would you want to.

It's always names-like-this in CSS code and namesLikeThis in the DOM.

-Mike


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to