You're looking for <http://prototypejs.org/api/element/addmethods> and that you can pass a tagname along with the new methods.
Martin On 07/02/2008, broberts <[EMAIL PROTECTED]> wrote: > > When I add my own extensions to DOM elements, is there a way to only > add my extensions to the specific types of DOM elements (e.g. SELECT) > to which my extensions apply or are intended to operate? > > Based on the Prototype API documentation (http://prototypejs.org/learn/ > extensions), it appears that anytime I extend an element, all the > extensions (Prototype's and my own) are copied to that element > regardless of the element's type. > > For example, I have a collection of extensions for operating on just > SELECT elements. However, I don't want to copy these extensions to > the non-SELECT elements that I also extend using the $ utility method, > Element.extend, etc. > > For obvious reasons, if I extend a DIV element, I don't want all my > SELECT extensions to be copied to it. Am I correct in assuming that > Prototype copies all my extensions to an extended element regardless > of its type? > > If so, is it possible to do otherwise? Though it does not appear to > me that it does so, does Prototype already handle this? If not, does > Prototype have the capacity to handle it? If so, how? > > Thanks in advance for any help group user are able to provide. > > > -- burnfield.com/martin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
