"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("borderColor");
  alert(bColor);

HTH

On Nov 16, 9:32 am, wellmoon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to get the border-color of a div.  The following code works in
> IE and alerts the color of the border:
>
> $("#mydiv").each(function() {
>   var borderColor = $(this).css("border-color");
>   alert(borderColor);
>
> });
>
> In FireFox it just alerts 'undefined'
>
> The border is set with CSS, not by javascript or jquery.  Am I doing
> something worng or is this a bug?

Reply via email to