Would this solution be able to reapply the Behaviour rules to elements
that are dynamically added to the page? Nolan's Behaviour.js has a
Behaviour.apply() function that does this.
cheers, chris
On May 3, 7:12 pm, "Mislav Marohnić" <[EMAIL PROTECTED]>
wrote:
> On 5/3/07, snarkyFish <[EMAIL PROTECTED]> wrote:
> Once, when we (the core guys) chatted working on the event branch, I though
> of how easy it would be to re-implement Behaviour in Prototype:
>
> var Behaviour = {
> register: function(obj) {
> Event.onReady(function(){ for (sel in obj) $$(sel).each(obj[sel]) })
> }
>
> }
>
> Yeah, this is it. You only need Event.onReady() for this. You can find it in
> the event branch or you can copy it over from LowPro. Once Event.onReady()
> gets into trunk, these 3 lines will probably be all you need.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---