Skip to main content

Bug Tracker

Side navigation

#3788 closed bug (wontfix)

Opened January 06, 2009 08:36AM UTC

Closed May 06, 2009 01:45AM UTC

Last modified March 14, 2012 12:33PM UTC

outerWidth returns 0 when parent item is hidden

Reported by: slifty Owned by: brandon
Priority: major Milestone: 1.3
Component: dimensions Version: 1.2.6
Keywords: outerWidth hidden Cc:
Blocked by: Blocking:

When an item's parent has display set to none, outerWidth() returns 0. This makes the method unreliable.


<script type="text/javascript">

$(document).ready(function() {




<div style="display:none">

<div id="test" style="width:500px">You can't read me!</div>


Attachments (0)
Change History (3)

Changed January 06, 2009 08:42AM UTC by slifty comment:1

As a note -- the documentation says that outerWidth will work for items that are hidden, which is why this behavior seems unexpected.

Changed May 06, 2009 01:45AM UTC by brandon comment:2

resolution: → wontfix
status: newclosed

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

I've updated the docs to clarify that the methods don't support parent-hidden elements.