howard chen schrieb:
I want to overload some 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/metadata.js
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