[EMAIL PROTECTED] wrote:
> sorry i dont understand what u mean :(
> can u give me a litle example?
> did you mean save  every
> TMS.Event.ShowPopup.bindAsEventListener(element); on array?
>   
Yes:

RegisterEvent: function() {
  this.listeners = [];
  document.getElementsByClassName('manage').each(
    function(element) {
      var act = TMS.Event.ShowPopup.bindAsEventListener(element);
      this.listeners.push([element, act]);
      Event.observe(element, 'click', act)
    },
    this
  );
},
UnregisterEvent: function() {
  this.listeners.each(function(pair) {
    var element = pair[0], act = pair[1];
    Event.stopObserving(element, 'click', act);
  });
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to