Google Groups Home
Help | Sign in
Message from discussion Automatic $(document).ready
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Sam Collett  
View profile
 More options Feb 13 2007, 2:08 pm
From: "Sam Collett" <sam.coll...@gmail.com>
Date: Tue, 13 Feb 2007 19:08:24 +0000
Local: Tues, Feb 13 2007 2:08 pm
Subject: Re: [Dev] Automatic $(document).ready
On 13/02/07, Jörn Zaefferer <Enc...@gmx.net> wrote:

> Sam Collett schrieb:
> > I have seen a few times that some are not putting code in
> > $(document).ready, so are sometimes asking why their code does not
> > work, e.g. you may see this
> > ...
> > <script type="text/javascript">
> > $("#mydiv").slideDown();
> > </script>
> > </head>
> > <body>
> > <div id="mydiv">...

> > Would it be possible for jQuery to delay execution if no element is
> > matched and the page isn't fully loaded? That way #myDiv will slide
> > down as expected.

> John actually had some code that did just that. But in most cases it
> works around a programming error that should be fixed instead, therefore
> it never got to wider public. The additional code and possible
> performance lost isn't really worth it.

> --
> Jörn Zaefferer

> http://bassistance.de

Let me guess - was it Internet Explorer that proved to be troublesome?
Using setInterval is the only way I can think of for doing this (but
could slow down the browser if there is lots of code calling it).

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google