[jQuery] Re: scope question

2007-12-04 Thread sawmac
> The function assigned to init plus the reference to a variable defined > outside of it ('me') is called a closure. You'll see people use 'self > = this' or '$this = $(this)' for this purpose frequently. Thanks Danny, Great explanation. --dave

[jQuery] Re: scope question

2007-12-03 Thread [EMAIL PROTECTED]
'this' is magic, and can be changed by the calling program. jQuery changes it to the target element in event handlers. If you want to use the original object, you have to save a reference to it somewhere. In your example, you are already saving that reference as 'myObject', so the following would