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 6106175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:03:06+00:00 2026-05-23T14:03:06+00:00

I have some tags that I want to bind to a function within jQuery’s

  • 0

I have some tags that I want to bind to a function within jQuery’s datepicker. However, jQuery automatically binds another function to the parent (.ui-datepicker-inline) div’s mouseover and mouseout events.

I want to override this function in some cases, but when some other event occurs, revert back to default functioning. I tried binding mouseover to it’s parent div (hasDatepicker) and this worked fine. However when I unbind the parent, the child’s old bind function stops working as well. Why is this? Is there any way to avoid that? I don’t care if the child keeps it’s bind function, as long as the parent’s bind does it’s thing afterward. I also don’t want to lose the child functionality when I unbind the parent.

I have a jQuery element datePicker which is the element that has the original bind (.ui-datepicker-inline) as far as I can tell from the jQuery UI code.

// This binds my function, occurring after datePicker's bound function,
// and works fine.
datePicker.parent().bind('mouseover', hoverWeek) // hoverWeek is a function(event)

/* ... */

// This unbind's datePicker as well as datePicker.parent()
datePicker.parent().unbind('mouseover');

Can I save the bound function and put it back when I need it? I shouldn’t think I’d have to, but if I did, how would I even go about doing that? Can I just say datePicker.bind('mouseover') to get the function bound to it?

[Update]
There were a few issues: Mainly I had some conflicting code, but there were also some issues with the bubbling effect. The solutions listed below are both good, and for future reference, here is another solution that works: http://jsfiddle.net/redEvo/7QpDx/

  • 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-23T14:03:06+00:00Added an answer on May 23, 2026 at 2:03 pm

    You can pass just your function to the unbind call:

    datePicker.parent().unbind('mouseover', hoverWeek);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to replace some HTML tags that I have in a CDATA element,
Ok here is my challenge, I have some <h1> tags that I want to
I have some jQuery that runs on a page. As a short-term fix I
I have custom JSP tags that generate some HTML content, along with some javascript
I have a JSP that is using Spring:form tags to bind controls to a
I have some MVC2 code that loops a collection of type Product held within
I have some TT templates that I want tidy-up a little. I use tidy
I'm working on a responsive design and I have some display <h3> tags that
I have a group of anchor tags that I want to have comma separated.
I have plain HTML file and I want to include some JSTL tags in

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.