On 3月4日, 上午12時37分, David Stamm <[EMAIL PROTECTED]> wrote:
> I'm sorry, I thought you were trying to architect your own plugin to
> make it easier to override for others.
>
> A useful technique when you're overriding someone else's function, is
> to save a reference to the original implementation right before you
> override it:
>
>         // save a reference to the original function
>         fn = jQuery.example;
>
>         // override function
>         jQuery.example = function(str) {
>                 // use the original implementation
>                 fn(str.toUpperCase());
>         };
>
> This doesn't really help in your example, since you're trying to
> override a call to alert().  But I thought I'd mention it, in case it
> does applies to your real-world situation.
>
> thanks,
> David
>
>

Thanks for your tips.

Howard

Reply via email to