http://www.quirksmode.org/js/events_properties.html

e.targetNode is the element that was clicked upon, not e.

kwah


On 8 September 2011 16:27, Robert <[email protected]> wrote:
> Hi Anthony,
>
>> You probably want .parentNode.
>
> I'd really like to use is, but...
>
> Error: e.parentNode is undefined
>
>
>         onClick( node,
>            function(e) {
>                // do something
>            }
>        );
>
>        function onClick( elm, func ) {
>                ( typeof elm === 'string' ? $('#'+elm) :
> elm).addEventListener('click', func, false);
>        }
>
>
> Robert
>
> --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to