height() indeed works for hidden elements. If the element has
display:none set it will briefly set display back, add
visibility:hidden and return the correct height. See it working in
this test page:
http://jsbin.com/ucumo/
you said that .hide() causes the **parent** element to loose its
.hide() sets the CSS style display:none. This takes the element out of the
layout, so in effect its height and width are treated as if they were 0. The
height and width don't actually change; you can set display:block or .show()
to have the element displayed in its original size.
If a parent
On Jan 16, 2009, at 7:56 PM, Michael Geary wrote:
snip
If you want an element to become invisible but remain part of the
layout,
then set .attr({visibility:'hidden'}) instead of using .hide(). Use
.attr({visibility:'visible'}) to display it again.
Excellent explanation, as always, Mike.
Karl,
How would one go about overriding jQuery's show() and hide() functions
to move the desired element to a negative screen position (CSS left:
-1) instead of changing the CSS display to none?
Carl
Karl Swedberg wrote:
On Jan 16, 2009, at 7:56 PM, Michael Geary wrote:
snip
If you
4 matches
Mail list logo