Skip to main content

Bug Tracker

Side navigation

#4616 closed bug (duplicate)

Opened May 01, 2009 11:27PM UTC

Closed May 06, 2009 02:56AM UTC

Last modified March 13, 2012 03:51PM UTC

get .css() class style

Reported by: Panman01 Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: get, css, class, style Cc:
Blocked by: Blocking:
Description

I'm sure this has been reported, just can't find a bug.

Using .css() to get a style property doesn't work if the style was set via css class. However, it seems to work in Opera. I've also tried to get the .css('cssText') with no avail. Attached is a test case.

Attachments (1)
  • test.html (0.7 KB) - added by Panman01 May 01, 2009 11:28PM UTC.

    Test Case for Bug

Change History (3)

Changed May 04, 2009 12:10AM UTC by dmethvin comment:1

Shorthand properties aren't reported consistently by browsers, and jQuery doesn't try to normalize them. There are many cases where they *cannot* be normalized. Each side of the border can have a different width, color, and style, so there isn't always a "border" css property to report. If you are writing code and want it to work consistently with varied borders, you must get border-top-color, border-top-width, border-top-style, etc.

Changed May 04, 2009 12:19AM UTC by Panman01 comment:2

Ah, I never thought of that. I did try out .css('border-top-width') and that did work. If this is a feature that could be added, ex: if all border sides are eq... Thanks for your help!

Changed May 06, 2009 02:56AM UTC by dmethvin comment:3

resolution: → duplicate
status: newclosed

I'll close this as a duplicate of #4295 where it's being discussed in depth.