Hi Jörn, this technique seems like a good idea though I'm not sure I follow what you did in the metadata plugin. Would you be able provide an example here of how you would overload the trim function in the same way as the earlier posting?
Many thanks, George On Apr 23, 7:14 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > howard chen schrieb: > > > I want tooverloadsome core jQuery method, e.g. trim() method > > > any codes sample or recommendation to do this? > > Save a reference to the original method in a closure and call that when > appropiate. An example for this can be found > here:http://dev.jquery.com/browser/trunk/plugins/metadata/lib/jQuery/metad... > > The advantage over this instead of saving the original to a static name > like _setArray: You can override a method more then once and won't notice. > > -- > Jörn Zaefferer > > http://bassistance.de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery (English)" group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~----------~----~----~----~------~----~------~--~---