I want to override jQuery.find to override additional functionality. I have thought of thinking such a thing on Ben Nadal's blog (but) for some reason it does not work for $ .find (), this is my code
(function () {// Store a reference for the original Remove method Define the Basic Basic Function = jQuery.find; // overriding method. JQuery.find = function () {// Sign in that we are calling the Override function. Console .log ("-" -> & gt; method called "); // then execute the original method var result = fundfix Sean. Apely (this, argument); return result;};}) (); Do you have any wrong ideas, or how can I override a jquery function?
Display .fn.
Code>
Overriding forest at this level has different meaning for this when you type .fn - this is the returned query result, which is "mixed" for any query result. Here, this will be the original object, and its use will vary. These are functions or utility functions called "statically".
Comments
Post a Comment