Side navigation
#10689 closed bug (invalid)
Opened November 05, 2011 09:52PM UTC
Closed November 05, 2011 09:57PM UTC
images not in dom report 0 width/height
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | css | Version: | 1.7 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
I have an image not in the DOM. $img.width() === 0. $img[0].width ===7680
Attachments (0)
Change History (2)
Changed November 05, 2011 09:54PM UTC by comment:1
Changed November 05, 2011 09:57PM UTC by comment:2
| component: | unfiled → css |
|---|---|
| priority: | undecided → low |
| resolution: | → invalid |
| status: | new → closed |
| version: | → 1.7 |
$img.width() gets computed styles. $img[0].width retrieves the uncomputed property value. Computed width should always be 0 on disconnected images.
very quick demo: http://jsfiddle.net/FYsuc/