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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:08:34+00:00 2026-05-28T13:08:34+00:00

I am using below code to get fade in fadeout effect for menus. Presently

  • 0

I am using below code to get fade in fadeout effect for menus.

Presently it is giving fade effect to the mouse hovered menu. chk the below link
http://www.queness.com/resources/html/fadein/index.html

But my requirement is,When I mouse over on particular menu, all other menus should get the fade effect but not the hovered menu(hovered menu should not get any effect).

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 
    "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>

<script type="text/javascript">    
//<![CDATA[   
$(document).ready(function () {    
    //Append a div with hover class to all the LI
    $('#navMenu li').append('<div class="hover"><\/div>');
    $('#navMenu li').hover(     
        //Mouseover, fadeIn the hidden hover class  
        function() {            
            $(this).children('div').stop(true, true).fadeIn('1000');    
        }, 
            //Mouseout, fadeOut the hover class
        function() {

            $(this).children('div').stop(true, true).fadeOut('1000');   
    });    
});    
//]]>
</script>    
<style type="text/css">    
body {
    background:#222;    
}

#navMenu {
    margin:0; 
    padding:0;
    list-style:none;    
    font-family:arial;
    text-align:center;
    line-height:60px;
}

    #navMenu li {
        float:left; 
        background:url(default.jpg) no-repeat center center;    /* default background image */
        width:120px;                            /* width and height of the menu item */
        height:70px;
        border-left:1px solid #111;             /* simulate pixel perfect using border */
        border-right:1px solid #333;
        border-top:1px solid #555;
        border-bottom:1px solid #333;
        position:relative;          /* must set it as relative, because .hover class top and left with absolute position will be positioned according to li.    */
    }

    #navMenu li a {z-index:20;      /* z-index must be higher than .hover class */
        display:block;  /* display as block and set the height according to the height of the menu to make the whole LI clickable   */
        height:70px;
        position:relative;
        color:#777;
    }

    #navMenu li .hover {
        background:url(over.jpg) no-repeat center center;       /* mouseover image  */
        position:absolute;  /* must be postion absolute     */
        width:120px;    /*  width, height, left and top to fill the whole LI item   */
        height:70px;
        left:0; 
        top:0;  
        z-index:0;      /* display under the Anchor tag */
        display:none;   /* hide it by default   */
    }   

    #navMenu li.selected {
        background:url(selected.jpg) no-repeat center center;   /* selected image   */
    }


</style>
</head>
<body>

<ul id="navMenu">
    <li><a href="#">Test 1</a></li>
    <li><a href="#">Test 2</a></li>
    <li><a href="#">Test 3</a></li>
    <li><a href="#">Test 4</a></li>
    <li><a href="#">Test 5</a></li>
    <li><a href="#">Test 6</a></li>
</ul>


</body>
</html>
  • 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-28T13:08:34+00:00Added an answer on May 28, 2026 at 1:08 pm

    try this code ….

    $('#navMenu li').append('<div class="hover"><\/div>');
        $('#navMenu li').hover(     
            //Mouseover, fadeIn the hidden hover class  
            function() {            
                 $('#navMenu li div').stop(true, true).fadeIn('1000');
                $(this).children('div').css("display", "none");    
            }, 
                //Mouseout, fadeOut the hover class
            function() {
    
                $('#navMenu li div').fadeOut('1000');   
        });   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this code, and I get the stack trace that is listed below.
Using this below code i get the name only first 4 character.But i need
I am using below code to get new inserted ID in auto identity column
I am using the below code to get attribute name $attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product','pricee'); echo
I can get the list of country names using below code, (copied from somewhere
I'm trying to get an IFrame inner HTML using below code. <iframe src=http://www.msn.com width=100%
I am using the code below to get information from a database and make
i using below code to get a picture from URL: URL url=new URL(http://www.google.com/images/logos/ps_logo2.png); InputStream
I am using below code to get calendar events in my application. It's working
I am currently using the below code to get a list of uuid's then

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.