Hi,

On Jan 11, 2:03 pm, bill <[email protected]> wrote:
> > Also note that if you know the element will have an ID, or if you
> > don't care if it doesn't, you can just use the `id` property.
[snip]
> I know the divs will have IDs, so how would I write it to just use the
> id property ?

It's just a property of the element instance:

    var elm, id;
    elm = event.findElement();
    if (elm) {
        id = elm.id;
    }

I'm probably being too conservative there; I can't immediately imagine
#findElement ever returning undefined if you give it no arguments --
*something* fired the event. :-)

HTH,

-- T.J.
-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en.


Reply via email to