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

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