Side navigation
#12243 closed bug (fixed)
Opened August 10, 2012 12:03PM UTC
Closed August 29, 2012 04:42PM UTC
$("col").width() returns 0
Reported by: | akorchev@gmail.com | Owned by: | mikesherov |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | dimensions | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It seems that width(), outerWidth() and css("width") no longer work for col elements. Zero is always returned. Here is the repro: http://jsbin.com/ilejan/1/edit
Attachments (0)
Change History (5)
Changed August 21, 2012 01:27AM UTC by comment:1
component: | unfiled → dimensions |
---|---|
owner: | → mikesherov |
priority: | undecided → low |
status: | new → assigned |
Changed August 21, 2012 01:41AM UTC by comment:2
Of course I can!
Changed August 29, 2012 09:25AM UTC by comment:3
I have a similar issue:
If you remove the div tag or if you use jQuery 1.7.2, width is reported correctly.
Changed August 29, 2012 12:06PM UTC by comment:4
nicola: http://stackoverflow.com/questions/1827965/is-putting-a-div-inside-an-anchor-ever-correct While jQuery worked in this case in 1.7.2, it was accidental. It worked because jQuery was changing the style of the a tag to display: block momentarily. This causes undesired and incorrect results elsewhere. Removing the div makes it work again, because you once again have valid HTML.
Long story short: use valid HTML and it works fine.
Fix for col coming shortly.
Mike, could you take a look at this?