#4616 closed bug (duplicate)
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)
Change History (4)
Changed 14 years ago by
comment:1 Changed 14 years ago by
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.
comment:2 Changed 14 years ago by
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!
comment:3 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
I'll close this as a duplicate of #4295 where it's being discussed in depth.
Test Case for Bug