[jQuery] Re: book learning jquery appendix C,closure question

2007-07-14 Thread Jonathan Chaffer
On Jul 13, 2007, at 20:53 , Stephan Beal wrote: As i understand it, that code is wrong, as globVar.innerFun2() is not available to the caller at this point. IMO, to be legal code, "innerFun2()" should be replaced with "outerFun2()". See: http://javascript.crockford.com/private.html for why in

[jQuery] Re: book learning jquery appendix C,closure question

2007-07-14 Thread Jonathan Chaffer
Yep, that looks like a mistake in the copy editing. We'll make sure that makes it into the errata list. Thanks for catching that! Here's the original code; our copy editor changed the variable names to match the publisher's style guide. $(document).ready(function() { function f() {

[jQuery] Re: book learning jquery appendix C,closure question

2007-07-13 Thread Stephan Beal
On Jul 14, 12:16 am, Guapo <[EMAIL PROTECTED]> wrote: > the following text if copy from the book,I was confused with the > variable globVar in the innerFun2,is it a clerical error or the > variable in the statement "var globVar = outerFun();"? > thank you all! > ===