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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:02:44+00:00 2026-05-22T15:02:44+00:00

My goal is to animate a JQuery menu to respond when hovered or clicked.

  • 0

My goal is to animate a JQuery menu to respond when hovered or clicked. Using the HoverIntent plugin the following code is working as intended to hover. But how do I add a click event while maintaining a user friendly menu? While planning how to write this I have considered adding a delay to the hover event when a menu item is clicked, however I am unsure how practical that implementation would be. How would I add the click event to the following code?

<script type="text/javascript">
$(document).ready(function() {

function show() {
 var menu = $(this);
 menu.children(".options").slideDown();
}

function hide() { 
 var menu = $(this);
 menu.children(".options").slideUp();
}

$(".menuHeader").hoverIntent({
 sensitivity: 3, 
 interval: 50,   
 over: show,     
 timeout: 300,  
 out: hide       
  });

});

<div id="SideMenu">
  <div id="aMenu" class="menuHeader">
   <h2>Menu A</h2>
    <ul class="options" >
      <li><a href="">Option a1</a></li>
      <li><a href="">Option a2</a></li>
      <li><a href="">Option a3</a></li>
    </ul>
  </div>
  <div id="bMenu" class="menuHeader">
   <h2>Menu B</h2>
    <ul class="options" >
      <li><a href="">Option b1</a></li>
      <li><a href="">Option b2</a></li>
      <li><a href="">Option b3</a></li>
    </ul>
  </div>
  <div id="cMenu" class="menuHeader">
    <h2>Menu C</h2>
     <ul class="options" >
      <li><a href="">Option c1</a></li>
      <li><a href="">Option c2</a></li>
      <li><a href="">Option c3</a></li>
     </ul> 
  </div>
</div>

Sorry about the formatting of the code, and thank you for your 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-05-22T15:02:45+00:00Added an answer on May 22, 2026 at 3:02 pm

    I never used hoverIntent, there’s anyway to unbind it?

    If there’s you can do something like this:

    $(",menuHeader").bind("click.show_menu", function() {
      show();
      //unbind over from hoverIntent
    })
    
    function hide() { 
      var menu = $(this);
      menu.children(".options").slideUp(function() {
        //rebind over from hoverIntent on callback from slideUp
      });
    }
    

    So you clicked a link, it will stack until you mouseout, and then when you hover it again or click on it it will stack again.

    Edit:
    You also need to unbind click on over function from the hoverIntent or it will cause a weird effect when you click the link.

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

Sidebar

Related Questions

I have been working with the slider and am using the following code: $(function(){
In the following code the last line doesn't work in my way: $('button.goal').click(function ()
I have a neat little jQuery script I am working on. Goal: parent div
I am using CSS and JS to animate a button here , the goal
I am using jQuery and jQuery-ui and want to animate various attributes on various
My goal is to animate my UI, and I am using UIView animations. The
Goal I am building an Eclipse plugin targeting the 3.7 environment and would like
Are there any jQuery plugins that make it easy to control/animate dom elements based
I am using offset() with the jquery slider and I am so close to
Goal: Create Photomosaics programmatically using .NET and C#. Main reason I'd like to do

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.