i don't understand ur problem quite right, but assuming that all you need is
to animate the height of a box from 0 to some max value, i would write it
like this

$('#wait').animate({ height: 'toggle' }, 3000);

If you wanted this box to be invisible during the initial page load, i would
use css... like this

#wait {
   display: none;
}

I don't know if this answered ur question. if it didn't then can u be a bit
more elaborate, and also post a link somewhere i can take a look at what u r
trying to achieve

-GTG

On 8/5/07, Kia <[EMAIL PROTECTED]> wrote:
>
>
>
> Can someone how an example of how to toggle the height, starting from
> height = 0px, without the box being visible for a few milliseconds.
>
> Thanks!
>
> > > >I've only tried it in Firefox. I'm using this doctype:
> > > >
> > > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "
> > > >http://www.w3.org/TR/REC-html40/loose.dtd";>
> > > >
> > > >Should I change it?
> > > >
> > > >My assuption was that the box is shown before JavaScript removes it?
> I
> > > >trigger the JavaScript like this:
> > > >
> > > >$(document).ready(function(){
> > > >  $('#wait').css({height: 0}).animate({ height: 'toggle' }, 3000);
> > > >}
>
> On Aug 1, 3:53 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> > Which browser? If you're in IE, then this flicker is because your page
> > is in Quirks mode instead of Standards mode (you'll need to provide a
> > correct DOCTYPE in order to trigger this).
> >
> > --John
> >
> > On 8/1/07, Kia Niskavaara <[EMAIL PROTECTED]> wrote:
> >
> > > I want to animate the height of a box so that it expands from 0px to
> it's
> > > default height.
> >
> > > I've tried
> >
> > > $('#wait').css({height: 0}).animate({ height: 'toggle' }, 3000);
> >
> > > But sometimes the box is visible for a few milliseconds.
> >
> > > I've also tried setting the height to 0 px in the stylesheet:
> >
> > > #wait{ height: 0px }
> >
> > > And then switch to the default height using jQuery:
> > > $('#wait').animate({ height: 'toggle' }, 3000);
> >
> > > But that doesn't work at all.
> >
> > > Any other suggestions to remove the flicker?
>
>

Reply via email to