Can you describe what you mean by future elements on the page? Do you mean elements that are later in the source order than the script? If so, that's pretty simple:
document.observe('dom:loaded', function(){ $$('div.foo').invoke('addClassName', 'bar'); }); Walter On Oct 24, 2012, at 7:52 AM, Henrik Aagaard Sørensen wrote: > I'm trying to append a class via addClassName on future elements on a page > with Prototype, however I do seem to struggle a bit with it. I know of > jQuery's .live feature, but I cannot find a similar feature in Prototype. > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/prototype-scriptaculous/-/3R9rCrWTjaIJ. > To post to this group, send email to prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. -- 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 prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.