> You're making it too complicated there, Dave. :-)
> 
>    function test() { alert('here'); };
>    jQuery( test );
>    test;  // test is now defined, but (usually) not yet executed

Ack, I missed the point completely, didn't I? I couldn't make sense of the
original question (no offense!) so I substituted a different question
without realizing it, and answered that instead. :-)

> > If I use the jQuery document.ready shortcut to delay the 
> > definition of a javascript function test(), what is the
> > correct way to reference test()?
> >
> > This does not work:
> >     jQuery ( function() { function test() {alert('here')} } );
> >     test;  // assume that test is defined at this point...

That's what didn't make sense. You want to define test later, but reference
it now? No, you can't do that.

> > I thought it might be something like this, but no joy there either:
> >     localJQ = jQuery ( function() { function test() {alert('here')} } );
> >     localJQ.test;

Hmm... What is it you *really* want to have happen? I have a feeling the
two-line examples are missing some key piece of information. If I can
understand it I can probably give you a more intelligent reply. :-)

-Mike

Reply via email to