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

  • Home
  • SEARCH
  • 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 6150599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:38:13+00:00 2026-05-23T19:38:13+00:00

If one Jquery plugin this code is executed: dropdown = { doc: $(document), element:

  • 0

If one Jquery plugin this code is executed:

dropdown = {
    doc: $(document),
    element: $('#user_info'),
    open: function() {
        if ( ! dropdown.element.hasClass('active') ) {
            dropdown.element.addClass('active');
            dropdown.doc.one( 'click', dropdown.close );
            return false;
        }
    },
    close: function() {
        dropdown.element.removeClass('active');
    }
};

dropdown.element.click( dropdown.open );

How can I disable/remove/unbind the click handler in my own custom (another file) Jquery plugin?

I was using this code:

dropdown = {
    doc: jQuery(document),
    element: jQuery('#user_info')
};

dropdown.element.click(function(e) {
    dropdown.element.unbind('click', dropdown.open);
});

I get what I want, but javascript console shows this error:

TypeError: Object #<Object> has no method 'unbind'...

Please let me know if there is a way to avoid this error.

Thanks in advance.

  • 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-23T19:38:13+00:00Added an answer on May 23, 2026 at 7:38 pm

    Ok, I get it:

    dropdown = {
        doc: jQuery(document),
        element: jQuery('#user_info'),
        open: function() {
            dropdown.element.addClass('active');
            dropdown.doc.one( 'click', dropdown.close );
            return true;
        },
        close: function() {
            dropdown.element.removeClass('active');
        }
    };
    
    dropdown.element.click( dropdown.open );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written my first JQuery plugin and one of it's dependancies is an external
I'm a newbie in jQuery... I've used one jQuery plugin (Actually SimpleModal Plugin) in
Goal: To implement a jQuery plugin for my rails app (or write one myself,
How do I make one jquery ui slider control another? If I slide slider
With the jQuery datepicker, how does one change the year range that is displayed?
How can I redirect the user from one page to another using jQuery or
I'm trying to highlight just one specific row in a table using jQuery. The
I am using SimpleModal in jQuery, and I have one confirm dialog. If the
I have created an interface using jQuery UI Tabs, however one of my requirements
I'm trying to execute a asp.net webservice using jquery. When I pass only one

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.