jQuery.find를 재정 의하여 추가 기능을 무시하고 싶습니다. 내가 그렇게 (http://www.bennadel.com/blog/1624-Ask-Ben-Overriding-Core-jQuery-Methods.htm를) 할 수있는 벤 나델의 블로그에서 논의 된 아이디어를 사용했지만 어떤 이유가 $ .find() 작동하지 않습니다, 이것은 당신이 잘못 어떤 생각을해야합니까 내 코드여분의 기능을 제공하기 위해 jQuery.find() 함수를 재정의하십시오.
(function() {
// Store a reference to the original remove method.
var originalFindFunction = jQuery.find;
// Define overriding method.
jQuery.find = function() {
// Log that we are calling the overridden function.
Console.log("------> Find method called");
// then execute the original method
var results = originalFindFunction.apply(this, arguments);
return results;
};
})();
입니다 , 또는 jquery 함수를 어떻게 오버라이드 할 수 있습니까?
대신 jquery.fn을 덮어 쓰면 문제가 해결됩니다. 추가 설명 주셔서 감사합니다. – kabaros
나는 당신이하려고하는 것에 대해 확신하지 못했습니다. 그래서 나는 대안들과 그들의 의미를 모두 밝혀 내려고 노력했습니다. :) –