[jQuery] Re: The .ready() event

2007-06-08 Thread Robert O'Rourke
Rob Desbois wrote: Is $(document) the only thing that .ready(..) should be applied to? When a page has a form on it with an item which should logically have the focus by default, I like to bung in some JS to focus on that element ASAP. It's not necessary for the entire DOM to be ready to

[jQuery] Re: The .ready() event

2007-06-08 Thread Rob Desbois
I might be missing something here but why not just use the noscript tag? Damn it, didn't even think of that! What an idiot! I'm far from knowing all the facts but I thought .ready() was just a jquery event for 'onload', for whatever element just loaded. Like .bind('onload', function(){ ...

[jQuery] Re: The .ready() event

2007-06-08 Thread Mike Alsup
You can call ready on anything you want, but the fn will only run when the document is ready. So what you have is no different than $(document).ready(). Mike On 6/8/07, Rob Desbois [EMAIL PROTECTED] wrote: Is $(document) the only thing that .ready(..) should be applied to? When a page has

[jQuery] Re: The .ready() event

2007-06-08 Thread Rob Desbois
Aha ok, thanks Mike. --rob On 6/8/07, Mike Alsup [EMAIL PROTECTED] wrote: You can call ready on anything you want, but the fn will only run when the document is ready. So what you have is no different than $(document).ready(). Mike On 6/8/07, Rob Desbois [EMAIL PROTECTED] wrote: Is

[jQuery] Re: The .ready() event

2007-06-08 Thread Jonathan Chaffer
On Jun 8, 2007, at 11:36 , Robert O'Rourke wrote: I'm far from knowing all the facts but I thought .ready() was just a jquery event for 'onload', for whatever element just loaded. Like .bind('onload', function(){ ... } );, Is that right? Mike answered the main question here, but just to

[jQuery] Re: The .ready() event

2007-06-08 Thread Robert O'Rourke
Nice one Jonathan, good to be clear on this stuff =] Jonathan Chaffer wrote: On Jun 8, 2007, at 11:36 , Robert O'Rourke wrote: I'm far from knowing all the facts but I thought .ready() was just a jquery event for 'onload', for whatever element just loaded. Like .bind('onload', function(){