Up until now I just put all my jQuery goodness inside the $(document).ready() function, including simple functions used in certain user interactions.

But functions that don´t require the DOM document to be loaded or are only called afterwards anyway, can be placed outside the $(document).ready() as well. Consider for example a very simple validation function such as:

one advantage of putting those functions inside the document ready function is that they don't pollute your global namespace... with the downside that if you need them somewhere else on the page they won't be available.

If all your functions are only called from within the jQuery(function () { }) block, put them inside it. Otherwise you're needlessly polluting the global namespace, which may lead to conflicts down the road.

Only declare functions globally that are also used by code in other scopes.