[jQuery] document ready shortcut and scoping

[jQuery] document ready shortcut and scoping


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...
I thought it might be something like this, but no joy there either:
localJQ = jQuery ( function() { function test() {alert('here')} } );
localJQ.test;
~ ~ Dave