This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Okay, the difference in scope makes sense. Bear you said the first way was kinda weird -- sounds like putting functions outside of the document ready block is the more standard or idiomatic way to call functions?
To be honest in most jQuery code, you won't see many named functions -- most are created inline unless they need to be called from multiple locations. But yeah, there's no real use case for limiting the scope of a function to the ready block -- creating two functions with the same name, one in the window scope and one in the ready handler scope, would be considered by most as a poor decision.
(Things are a bit different when writing plugins -- but that, as they say, is another show.)
Yeah, it's weird, mostly because people don't generally define functions inside other functions, unless it's part of a module pattern. I brought it up only because it *is* a way to tuck away single-use functions without having to worry about naming.