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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:48:49+00:00 2026-06-07T01:48:49+00:00

I cant get the jquery menu to work like it should When i hover

  • 0

I cant get the jquery menu to work like it should

When i hover class .trigger is slides down but when i go down with my mouse is slide up and down all the time.

LINK TO WEBSITE: HERE

Jquery

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

        $('.sub_menu').hide();

        $('.trigger,.sub_menu').mouseenter(function() {
        //show its submenu
            $('.sub_menu').slideDown(300); 
        }); 

        $('.sub_menu,.trigger').mouseleave(function() {
        //show its submenu
            $('.sub_menu').slideUp(300); 
        }); 


    });
</script>

HTML

<div id="header">
    <div class="container">
        <a href="index.php"><h1 id="logo">Dick van Leeuwen Financieel Consult</h1></a>

        <div id="nav">
            <ul class="main_menu">
                <li><a href="#">Home</a></li>
                <li>
                    <a href="#" class="trigger">Hypotheken</a>
                    <ul class="sub_menu">
                        <li><a href="#">Hypotheekvormen</a></li>
                        <li><a href="#">Hyporheek rente</a></li>
                        <li><a href="#">Nationale hypotheek garantie</a></li>   
                    </ul>
                    <div class="clear"></div>                       
                </li>
                <li><a href="#">Verzekeringen</a></li>
                <li><a href="#">Downloads</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </div><!-- nav -->
    </div><!-- container -->
</div><!-- header -->

Please help me getting stuck for about 5 hours now.

  • 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-07T01:48:51+00:00Added an answer on June 7, 2026 at 1:48 am

    you could make the li your trigger instead of the a. that way you shouldn’t get the mouseleave event when hovering the sub_menu:

     <li><a href="#">Home</a></li>
          <li class="trigger">
               <a href="#">Hypotheken</a>
               <ul class="sub_menu">
                    <li><a href="#">Hypotheekvormen</a></li>
                    <li><a href="#">Hyporheek rente</a></li>
                    <li><a href="#">Nationale hypotheek garantie</a></li>   
               </ul>
               <div class="clear"></div>                       
            </li>
            <li><a href="#">Verzekeringen</a></li>
            <li><a href="#">Downloads</a></li>
            <li><a href="#">Contact</a></li>
    

    then change your js to that:

    $('.trigger').mouseenter(function() {
        $('.sub_menu').slideDown(300); 
    }).mouseleave(function() {
        $('.sub_menu').slideUp(300); 
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a drop down menu using javascript/jquery but can't get my
I cant get jquery's date picker to work on my page. I have a
I'm so close but I can't get this to work like I want it.
I'm trying to get a menu to slide in/out using jQuery UI and I
im trying to make an easy drop down menu plugin for jquery but for
I can't get the jQuery datepicker to work. I have followed everything from the
Not sure what I'm doing wrong but I can't get my JQuery AJAX call
I have implemented the Jquery cycle plugin on my page but I can't get
**I currently have this jQuery drop menu working fine but I'm wanting the parent
I would like to make a color fading navigation menu using jQuery, in which

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.