[jQuery] Re: .css("border-color") problem in FireFox

2007-11-17 Thread Dave Methvin
> Each time this has come up, some have wondered if jQuery couldn't/shouldn't > normalize this (since browsers seem to handle it differently), but no one > has volunteered. Perhaps someone will come up with a great strategy to normalize these properties, but the ones I could think of would add co

[jQuery] Re: .css("border-color") problem in FireFox

2007-11-17 Thread wellmoon
Thanks for the tip Kevin, I cracked it in the end by referring to the full name of the property: var borderColor = $(this).css("border-left-color"); As borders are usaully the same color all around the element this will suffice and it works in both IE and FF Cheers On Nov 16, 6:45 pm, Kevin S

[jQuery] Re: .css("border-color") problem in FireFox

2007-11-17 Thread Richard D. Worth
Also known as a shorthand css property. See these threads for more info: element.css("background") returns undefined http://groups.google.com/group/jquery-en/browse_thread/thread/b1c863aa49ba185b .css("border-color") returning undefined http://groups.google.com/group/jquery-en/browse_thread/threa

[jQuery] Re: .css("border-color") problem in FireFox

2007-11-16 Thread Dave Methvin
> I want to get the border-color of a div. The border-color property is most useful for setting all the border sides at once. When getting the colors it's more complicated. Which side of the div do you want to examine: top, right, bottom, or left? Each can be a different color. If they were diffe

[jQuery] Re: .css("border-color") problem in FireFox

2007-11-16 Thread Kevin Scholl
"borderColor" is a reserved word, so it shouldn't be used as a variable name. Try using something else, maybe "bColor" or something like that. Also, you might want to replace css("border-color") with css("borderColor") for consistency. $("#mydiv").each(function() { var bColor = $(this).css("bor