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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:57:52+00:00 2026-06-13T03:57:52+00:00

I have a Drupal site with a standard jQuery/suckerfish-style menu, which I have modified

  • 0

I have a Drupal site with a standard jQuery/suckerfish-style menu, which I have modified to cause the final top-level LI to have some special functioning via jQuery. Specifically, on mouseover, it reveals a tab with reservations functionality. When the date input fields are clicked, jQuery UI datepicker activates. I need this reservations tab and the calendar to stay active so long as either are in-focus/hover/mouseover.

The HTML contained in the #reservations-tab div is here: http://pastebin.com/BPp4vS0R

I’ve not put it directly in this post because it’s quite lengthy.

jQuery:

$(document).ready(function(){  
 // Add div for reservations to display beneath "Stay" link when hovered.
  $('#reservations-tab').hide();
  $('.menulinkstay' || '#reservations-tab').mouseenter(function(){
    $('#reservations-tab').show().fadeTo(400, 1);
  });
  $('.menulinkstay' && '#reservations-tab').mouseleave(function(){
    $('#reservations-tab').stop().fadeTo(400, 0);
  });
  // Datepicker & Datepicker div hide
  $('.datepicker-input .field').datepicker();
  $('#reservations-datepicker-checkin .widget-icon').click(function() {
      $('#reservations-datepicker-checkin .datepicker-input  .field').datepicker('show');
}), $('#reservations-datepicker-checkout .widget-icon').click(function() {
  $('#reservations-datepicker-checkout .datepicker-input .field').datepicker('show');
});
});

I’ve tried adding && '#ui-datepicker-div' to the first .mouseleave function; I’ve also tried multiple variants of doing it as a standalone line of code after the ‘show’ part of the datepicker invocation. I’ve tried using .hover, .mouseover, and .mouseleave.

In all contexts, I can get it to where the #reservations-tab is fading in properly, and the datepicker works, but either A.) The #reservations-tab div disappears when the UI Datepicker gains focus, or B.) The UI Datepicker appears and works as intended, but the #reservations-tab does not disappear moving the mouse entirely out of the area.

Much thanks in advance for any/all help.

  • 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-06-13T03:57:53+00:00Added an answer on June 13, 2026 at 3:57 am

    OK one solution I’ve used for similar problems in the past. Basically If you can structure your HTML like so:

    <div id="reservations-widget">
     <!--widget code-->
    </div>
    <div class="mainDiv">
    
    </div>
    

    then you can structure your jQuery like:

    $(document).ready(function(){  
     // Add div for reservations to display beneath "Stay" link when hovered.
      $('#reservations-tab').hide();
      $('.menulinkstay' || '#reservations-tab').mouseenter(function(){
        $('#reservations-tab').show().fadeTo(400, 1);
      });
      $('div.mainDiv').hover(function(){
        $('#reservations-tab').stop().fadeTo(400, 0);
      });
      // Datepicker & Datepicker div hide
      $('.datepicker-input .field').datepicker();
      $('#reservations-datepicker-checkin .widget-icon').click(function() {
          $('#reservations-datepicker-checkin .datepicker-input  .field').datepicker('show');
    }), $('#reservations-datepicker-checkout .widget-icon').click(function() {
      $('#reservations-datepicker-checkout .datepicker-input .field').datepicker('show');
    });
    });
    

    So now rather then the mouse leave function being fired whenever you hover over the datepicker, providing both your datapicker and hover overs our outside of mainDiv they should stay visible.

    When the user leaves the drop down “area” they should enter your main div, thus firing the hover event on this and hiding your menus.

    Hope that’s explained satisfactory and helps.

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

Sidebar

Related Questions

Our drupal site runs with jQuery version 1.2.1 which we have not upgraded. The
I have Drupal 7 site which is working fine. I added a custom PHP
I need to develop a site on Drupal 7. I have some content types
On an ubuntu server, I have a drupal site which uses nginx+fastcgi as webserver
I have a Drupal site using jQuery 1.3, so that unfortunately I cannot use
I have a Drupal site on which users can enter CCK content by uploading
I have a standard Drupal site and need to add a redirection rule for
I have a non-Drupal site which authenticates with a simple MySQL user database. I
I have created a drupal module which displays some reporting data. I would like
I have just set up a new Drupal site, community based. there are some

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.