Hi Davide,
I would probably observe ul as the event will bubble up the dom the
you can get id of child node that triggered the event. One point to
consider is to have the ul & li's having ids just to make it easier
extracting the actual element infocus.

On 12/18/08, Davide <[email protected]> wrote:
>
> Hi all,
>
> I would like to know if any1 knows how to bind the events I have
> defined to a newly inserted element
>
> let's say that I have a simple list as:
>
> <ul>
> <li>element1</li>
> <li>element2</li>
> <li>element3</li>
> </ul>
>
> and each one has got binded during window load its own events such as
> this one
>
> Event.observe(window, 'load', function() {
>   //other code
>   $(element).observe('mouseover', function() {
>      element.addClassName('over');
>   });
> });
>
> Let's say that now I am adding the
>
> <li>element4</li>
>
> to the list above. Is there a way to link this newly element to the
> one I have already defined ? Is is possible maybe to copy the elements
> and just change a bit the contents retaining the binded behaviors ?
>
> Thank you in advance.
> Davide
>
> >
>

-- 
Sent from Gmail for mobile | mobile.google.com

--~--~---------~--~----~------------~-------~--~----~
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