>
> How can I define "private" methods for tabs function, so that onclick
> event handler can use this "private" function, instead of anonymous
> one?
>

Is this what you're looking for?

Object.extend(Element.Methods, {
    tabs: function(element, options){
      var saySomething = function() {
        alert("blah");
      }

      var clicked = function(e) {
        saySomething();
      }

      element = $(element);
      var links = element.select('ul li a');
      links.invoke('observe', 'click', clicked);
    }
});
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to