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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:53:29+00:00 2026-06-11T02:53:29+00:00

when i changed the li items to links (using a hef) in the navigation

  • 0

when i changed the li items to links (using a hef) in the navigation bar only home, about and contact is displaying (these are links without submenus). REgister Company and Buy Company are not displaying (these are links with submenus). My code at jsfiddle.net/vaanipala/rVNQk/7. What could be the problem?

FYI, if the li items were not links the navigation bar is displaying fine.

thank you.

html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 

Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Gama Corporate Services</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#submenu1,#submenu2").children().hide();
    $("#subsubmenu1").children("ul").hide();

    $("#submenu1,#submenu2").hover( 
        function(){//onmouseover 
            $(this).children("ul").slideDown(); 
        }, 
        function(){//onmouseout 
            $(this).children("ul").slideUp(); 
    });

    $("#subsubmenu1").hover(
        function(){//onmouseover

            $(this).children("ul").animate({marginLeft:"130px"}).css({
                                "position":"absolute",
                                "z-index":"-1",
                                "width":"120px",
                                "display":"block"});
            $(this).children("ul").show();
        },
        function(){//onmouseout
            $(this).children("ul").animate({marginLeft:"0"}).css({"position":"absolute","z-index":"-1"});
            $(this).children("ul").hide();
        }); 
});
</script>
</head>

<body>
<div class="contentwrapper">
<div id="header">
<div id="logo">
    <img src="images/logo.png" />
</div>
<!--<div id="company_name">
    Gama Corporate Services Sdn Bhd
</div>-->
<div id="navbar">
    <ul id="menu">
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li id="submenu1"><a href="a.html">Register Company</a>
            <ul>
                <li id="subsubmenu1"><a href="b.html">New Sendirian Berhad Registration</a>
                    <ul>
                        <li><a href="#">Company Price</a></li>
                        <li><a href="#">Register New Company</a></li>
                        <li><a href="#">Steps to Incorporate</a></li>
                    </ul>
                </li>
            </ul>
        </li>
        <li id="submenu2"><a href="c.html">Buy Company</a>
            <ul>
                <li><a href="#">Sendirian Berhad Ready Made Companies in Malaysia</a></li>
            </ul>
        </li>
        <li><a href="#">Contact</a></li>
    </ul>
</div>
</div>

<div id="leftcolumn">hello</div>
<div id="contentcolumn">Welcome to Gama Corporate Services.
This website is under construction</div>
<div id="rightcolumn">how ru</div>
<div id="footer">copyright gama corporate services</div>
</div><!--end contentwrapper-->

</body>
</html>

style.css

 /* CSS Document */
html body{
    padding:0;
    margin:0 auto;
}

.contentwrapper{
    width:900px;
    margin-left:auto;
    margin-right:auto;
    height: auto !important;
}
#header{
/*  height:20%;
*/  width:900px;
    height:280px;
    /*background-color:#009999;*/
    background-image:url('../images/bg_image.jpg');
    background-repeat:no-repeat;
    float:left;
    text-align:center;
}
#logo{
/*margin-top:15%;*/
float:left;
width:40%;
}
/*#company_name{
float:left;
font:"Times New Roman", Times, serif;
font-size:36px;
margin-top:20%;
}*/
#navbar{
/*  height:10%;
*/  width:900px;
    color:#ffffff;
    float:left;
    margin-top:2%;
    padding:0;
    z-index:0;
    position:relative;

}
#menu{
    list-style-type:none;
    margin:0;
    padding:0;
    position:absolute;
}

#menu li{
float:left;
    display:block;
    width:120px;
    text-align:center;
    background-color:#FF0000;
    padding:0;
    margin:0;
}
#menu li a{
display:block;
width:120px;
text-decoration:none;
line-height:25px;
padding:0;
}
#submenu1 ul, #submenu2 ul{
    float:left;
    display:block;
    width:120px;
    padding:0;
    margin:0;
}
/*#menu li ul ul li*/
#subsubmenu1 ul li
{position:relative;
left:0;
top:-30px;
background:#3399CC;
}


#leftcolumn{
    float:left;
    width:20%;
    background-color:#FF9900;
}
#contentcolumn{
    float:left;
    width:60%;
    background-color:#ffffff;
}
#rightcolumn{
    float:left;
    width:20%;
    background-color:#FF9900;
}
#footer{
/*  height:10%;
*/  width:inherit;
    padding-top:4px;
    background-color:#009999;
    text-align:center;
}
  • 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-11T02:53:30+00:00Added an answer on June 11, 2026 at 2:53 am

    You should use

    $("#submenu1,#submenu2").children("ul").hide(); 
    

    instead of

    $("#submenu1,#submenu2").children().hide();
    $("#subsubmenu1").children("ul").hide();
    

    to hide the sub menus.
    This will display you menus with sub menus.

    Your link <a href="a.html">Register Company</a> is the child of sub menu “submenu1” so your code $("#submenu1,#submenu2").children().hide(); simply hide it.
    That’s why you are not able to see those links.

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

Sidebar

Related Questions

I am using Dijit Menu bar with declartive markup. The Menu items contains links
I have a ListView that shows around 300 items. When something is changed and
I have a database with Users. Users have Items. These Items can change actively.
I'm using will_paginate to paginate my items eight at a time. I want to
I am retrieving a list of items from a URL and displaying them in
I am using pjax for main navigation and pagination (kaminari). Within the page I
Using a shared repo (core.sharedRepository=group) we ran into some issues with git creating read-only
Up until around 3.3beta1 items in the WP_Admin_Bar Object could be accessed using this
I am using TTLauncherView and adding items to it dynamically. My items are added
Imagine that during a foreach(var item in enumerable) The enumerable items change. It will

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.