Bug Tracker

Modify

Ticket #7746 (closed bug: invalid)

Opened 3 years ago

Last modified 21 months ago

get nothing by css('borderColor')

Reported by: skywine13@… Owned by:
Priority: high Milestone:
Component: css Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

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

Change History

comment:1 Changed 3 years ago by jitter

  • Priority changed from undecided to high
  • Status changed from new to open
  • Component changed from unfiled to css
  • Milestone changed from 1.next to 1.5

comment:2 Changed 3 years ago by anonymous

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

comment:3 Changed 3 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 3 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 3 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 3 years ago by john

  • Status changed from open to closed
  • Resolution set to invalid

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

comment:7 Changed 21 months 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.