Browsers don't provide height/width information for elements when
they're display: none (or within a display: none element). There is no
workaround for it - other than making the element not display: none.
Sorry :-/
Naturally, if an alternative is ever developed for retrieving the
height/width of a display: none element that doesn't involve toggling
its display we'll happily switch to it.
--John
On Wed, Jan 6, 2010 at 6:53 PM, average_user bht...@gmail.com wrote:
Hi,
I noticed that in the nightly builds, the function jQuery.swap() is
still used internally in the jQuery.css() function to get the
dimensions of an element.
It hurts to see this unbelievable hack, apart from the obvious
consequences: http://dev.jquery.com/ticket/5743
This function is used internally only once, and one CAN get the
required attributes without using jQuery.
I repeat this for clarity: This hack temporarily updates the DOM just
to read an attribute.
I hope that this has just been overlooked somehow.
If, on the other hand, it is considered safe to do this, than a bugs
should be filed against all browsers that cannot cope with it. I would
like to know what the strategy is.
Thanks.
--
You received this message because you are subscribed to the Google Groups
jQuery Development group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups
jQuery Development group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en.