. , jQuery ( "fn" ), $.find. , :
var oldFind = $.find;
$.find = function() {
console.log("something new.");
console.log(oldFind.apply(this, arguments));
};
$.find("div");
, . :
(function() {...})();
This makes the code in the first couple, self-executing (correct me if I am wrong here), which may not have the desired intention if you call the contained code outside this function. The following is a working example of the snippet below: http://jsfiddle.net/nuPLV/
source
share