width() returns incorrect results

width() returns incorrect results


Basically, width() returns an incorrect result when called on a hidden
element that has absolute or fixed positioning, and no explicit width
assigned. I'm doing this to correctly and dynamically position some UI
elements before showing them.
I posted ticked #1818 with an example, and it looks like somebody else
posted ticket #1839, which is a duplicate of mine.
The fix seems to be simple: changing the one line in .css() that sets
the 'left' and 'right' CSS properties to zero, to instead set the
'left' and 'top' properties to zero.