Skip to main content

Bug Tracker

Side navigation

#7746 closed bug (invalid)

Opened December 10, 2010 11:38AM UTC

Closed April 17, 2011 06:17PM UTC

Last modified August 09, 2012 06:59PM UTC

get nothing by css('borderColor')

Reported by: skywine13@gmail.com Owned by:
Priority: high Milestone:
Component: css Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

hey guys,

I got a problem that I use 1.4.4 version and my code doesn't work.

I tried to set css border color by call .css('borderColor', '...'), it works.

but when I used same function .css('borderColor') to get some, I got nothing but ''.

The same work fine on 1.4.2 and FireFox 3.6.13. (but I need to face another bug: unbind with JS object......)

Is this a bug, or just my fault ???

Attachments (0)
Change History (7)

Changed December 13, 2010 07:15PM UTC by jitter comment:1

component: unfiledcss
milestone: 1.next1.5
priority: undecidedhigh
status: newopen

Changed December 28, 2010 09:07AM UTC by anonymous comment:2

Same thing with css('borderWidth'), even with css('border').

Changed January 02, 2011 01:18AM UTC by SLogic comment:3

Some fix here: http://bugs.jquery.com/ticket/7871#comment:2 (in the end of post, after "Update").

But it's not extend computedStyle, if FF 3.6 still no values for 'borderWidth'. But there is 'borderRigthWidth' (all 4 sides exists in computedStyle), so this is a way to get borderWidth in FF.

Changed March 03, 2011 10:24AM UTC by anonymous comment:4

Yes I have the same problem.

Jquery 1.4.4

alert( $(linkid).css("border-color") );

Nothing is returned.

alert( $(linkid).css("borderColor") );

Nothing is returned.

alert( $(linkid).css("background-color") );

rgb(255,255,255) is returned.

Changed March 30, 2011 12:10PM UTC by dfens comment:5

this is not a bug.

there are four border

each can have different color so you can do:


var x = $("#elem");
alert( x.css("border-left-color") ); 

i think this ticket may be closed.

Changed April 17, 2011 06:17PM UTC by john comment:6

resolution: → invalid
status: openclosed

Right yeah, you need to using border-*-color.

Changed August 09, 2012 06:59PM UTC by noAlvaro comment:7

.css("border-color") return precise values for all the other browsers.

For the sake of writing a more cross-compatible jQuery code, I think this ticket should be reopened.