Loading ...
Sorry, an error occurred while loading the content.
 

Re: height to: auto?

Expand Messages
  • green_jimmy_sm
    Yeah, I knew that - just wanted to make sure you did not have something else in mind. Turns out that I needed to change the visibility to hidden for the clone
    Message 1 of 11 , Jun 29, 2006
      Yeah, I knew that - just wanted to make sure you did not have something else in mind.
      Turns out that I needed to change the visibility to hidden for the clone AND append it to
      the body in order to get the offsetHeight. I had seen another script that was able to get
      height without appending to the body though - go figure. BTW, composing text using
      Safari here is awful - it keeps autoscrolling below what I am typing.

      --- In ydn-javascript@yahoogroups.com, "Steven Peterson" <peterson@...> wrote:
      >
      > visibility:hidden is your best bet. You can't measure the offset height if
      > it's display:none.
      >
      >
      >
      > Steven Peterson
      >
      > Web Developer, Platform Engineering
      >
      > Yahoo!
      >
      > From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com]
      > On Behalf Of green_jimmy_sm
      > Sent: Wednesday, June 28, 2006 2:35 PM
      > To: ydn-javascript@yahoogroups.com
      > Subject: [ydn-javascript] Re: height to: auto?
      >
      >
      >
      > Invisible as in visibility hidden, display none, or opacity 0 ? :)
      >
      > --- In ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com> , "Steven Peterson" <peterson@>
      > wrote:
      > >
      > > In my experience, the best way to do this is to set the div to invisible
      > at
      > > its auto height, and use offsetHeight to calculate the end point for the
      > > animation. I know this sounds like what you've done via clone, but perhaps
      > > you should try doing it without cloning first to see if the cloning
      > approach
      > > is where the issue is occurring. I've been able to successfully do this in
      > > the past, so I think the invisible approach should work for you. Let me
      > know
      > > if you manage to get it worked out, and if not, perhaps you can post a
      > code
      > > sample to the group so that we can take a look at it.
      > >
      > >
      > >
      > > Steven Peterson
      > >
      > > Web Developer, Platform Engineering
      > >
      > > Yahoo!
      > >
      > > From: ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com>
      > [mailto:ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com> ]
      > > On Behalf Of green_jimmy_sm
      > > Sent: Wednesday, June 28, 2006 10:09 AM
      > > To: ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com>
      > > Subject: [ydn-javascript] height to: auto?
      > >
      > >
      > >
      > > So I have a div that I want to grow to it's auto height starting from
      > > a height of 0px. But for the life of me I can't get it to work. Using
      > > "auto" causes an error, so I tried to clone the object - set the
      > > cloned height to auto - then use the cloned offsetHeight, and that did
      > > not work. I don't want to use a fixed height, so that is out of the
      > > question. There has to be a way to do this, moo.fx and prototype pull
      > > it off - what am I not doing?
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.