Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#7746 closed bug (invalid)

get nothing by css('borderColor')

Reported by: [email protected] Owned by:
Priority: high Milestone:
Component: css Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


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 ???

Change History (7)

comment:1 Changed 12 years ago by jitter

Component: unfiledcss
Milestone: 1.next1.5
Priority: undecidedhigh
Status: newopen

comment:2 Changed 12 years ago by anonymous

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

comment:3 Changed 12 years ago by SLogic

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.

comment:4 Changed 12 years ago by anonymous

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.

comment:5 Changed 12 years ago by dfens

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.

comment:6 Changed 12 years ago by john

Resolution: invalid
Status: openclosed

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

comment:7 Changed 10 years ago by noAlvaro

.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.

Note: See TracTickets for help on using tickets.