No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

jQuery Function Wrapper

Copyright 2012, Ricki Runge ( Dual licensed under the MIT or GPL licenses.


orgFn: original function to wrap fn: function that wraps the original function. Signature for the function may be "function(orgFn[, arg1, arg2, ...])" context (optional): If you want the method to be executed in a special context (context will be availabe as "this"). If null/undefined the global object is used (usaly window)

Example of use: window.myFunc = $.wrapper(window.myFunc, function(org_myFunc, myArg1, myArg2, myArg3) { console.log("before myFunc"); var myResult = org_myFunc(myArg1, myArg2, myArg3); console.log("after myFunc"); return myResult; });