Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4065656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:00:40+00:00 2026-05-20T16:00:40+00:00

I want to override jQuery.find to override extra functionality. I have used the idea

  • 0

I want to override jQuery.find to override extra functionality. I have used the idea discussed on Ben Nadel’s blog to do so ( http://www.bennadel.com/blog/1624-Ask-Ben-Overriding-Core-jQuery-Methods.htm ) but for some reason it doesn’t work for $.find(), this is my code

        (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;
        };
    })();

do you have an idea what’s wrong, or how can I override a jquery function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:00:41+00:00Added an answer on May 20, 2026 at 4:00 pm

    The demonstration in your reference uses a function from .fn.

    jQuery.fn.remove
    

    Where you’re overriding a function on

    jQuery.find
    

    Overriding functions on this level have different meaning for this.
    When you’re working on .fn. – the this is the returned query result, which are “mixed in” to any query result.

    Here, the this will be the root object itself, and the usage by it is different. These are functions or utility functions that are invoked “statically”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to override the jquery autocomplete to add two extra result rows Could
In addition to jquery plugin options, I want to override those values with html5
We have a thick client app using jQuery heavily and want to profile the
jQuery Mobile has a fine collection of themes for buttons. http://jquerymobile.com/test/docs/buttons/buttons-themes.html However, I want
I have some HTML with an onclick attribute. I want to override that attribute
I have a legacy website using Prototype. But I want to use JQuery in
I want to override jQuery's fadein and fadeout effects when page loads. How it
I have developed an app in phonegap (html5, JQuery, JS) and I want to
I am using the Smoothness theme with Jquery tabs, and I want to override
I want to override jQuery's hide() function on my object. I want it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.