[jQuery] Re: block on body onload, unblock on at the end of $(document).ready

2009-02-02 Thread Ricardo Tomasi
There's no guarantee that the 'body' element will exist at the point you inserted the script, it should be right after the tag, not before. Usually there's nothing visible in the page before ready() fires, unless you're dealing with a very large document. On Feb 2, 8:44 pm, cambazz wrote: > w

[jQuery] Re: block on body onload, unblock on at the end of $(document).ready

2009-02-02 Thread cambazz
well, what I want is document to be blocked before its ready. and unblock when document is ready is finished so before I made a $('body').block(); and at the end of the document ready $('body').unblock() it works, but I wonder if there is something i missed? best. On Feb 2, 11:11 am

[jQuery] Re: block on body onload, unblock on at the end of $(document).ready

2009-02-02 Thread Ricardo Tomasi
the 'onload' event actually fires after document ready - that's the reason doc ready exists! What you want is to block *on* doc ready, and unblock after your ajax stuff is finished. As ajax is asynchronous, you'll have to keep track of every call to know when everything is done. $(document).read

[jQuery] Re: block on body onload, unblock on at the end of $(document).ready

2009-02-01 Thread Mike Alsup
> I would like to blockUI on body onload like: > > > > and when document ready finishes unblock, but unfortunately i can not > unblock it if I put blockUI on onload of body. > > My page makes few ajax calls and some processing on document ready, > and i want to blockUI until page finishes loading