Actually, $thisCell is initialized with the *undefined* value, not the
*null* value.
var foo; // undefined
var bar = null; // null
alert( foo === bar ); // false
alert( foo == bar ); // true, but only because of type conversion
-Mike
> From: Peter Warnock
>
> No. $thisCel
Thanks for the correction Michael. Looks like I didn't look closely enough.
Sorry for the noise.
- Richard
On Thu, May 14, 2009 at 11:12 AM, Michael Geary wrote:
> Nope.
>
> This:
>
> var $thisCell, $tgt = $(event.target);
> does not mean:
>
> var $thisCell = $(event.target);
> var $tgt
No. $thisCell is initialized with a null value in the current scope.
- pw
On May 13, 11:12 pm, runrunforest wrote:
> Hi,
>
> I see this line in a plugin
>
> var $thisCell, $tgt = $(event.target);
>
> does that mean:
>
> var $thisCell = $(event.target);
> var $tgt = $(event.target);
Nope.
This:
var $thisCell, $tgt = $(event.target);
does not mean:
var $thisCell = $(event.target);
var $tgt = $(event.target);
After all, there's only one jQuery object being created in the first
example, and two distinct objects in the second.
Nor does it set both variables to the
Yup. See
https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Statements/Var
- Richard
On Thu, May 14, 2009 at 2:12 AM, runrunforest wrote:
>
> Hi,
>
> I see this line in a plugin
>
> var $thisCell, $tgt = $(event.target);
>
> does that mean:
>
> var $thisCell = $(event.target);
> va
5 matches
Mail list logo