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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:07:29+00:00 2026-06-13T23:07:29+00:00

I have a HTML Jquery menu bar which I have created, and I need

  • 0

I have a HTML Jquery menu bar which I have created, and I need to create a button to show and hide the menu.

I am think that somehow I can use JQUERY also in this to show/hide the menu bar with a click of the menu button.

The menu bar is like so
http://codecanyon.net/theme_previews/2867525-jquery-dashboard-vertical-navigation?index=1

I am thinking I can somehow collapse all the buttons into the top icon? Is this possible?

HTML

<div class="sidebar">
    <div class="logo">
    </div>
    <ul>
        <li>
            <a href="#">Campaigns </a>
            <ul class="submenu">
                <li><a href="#">Sub Menu1</a></li>
                <li><a href="#">Sub Menu2</a></li>
            </ul>
        </li>
        <li>
            <a href="#">Links </a>
            <ul class="submenu">
                <li><a href="#">Sub Menu1</a></li>
                <li><a href="#">Sub Menu2</a></li>
            </ul>
        </li>
        <li>
            <a href="#">Media </a>
            <ul class="submenu">
                <li><a href="#">Sub Menu1</a></li>
                <li><a href="#">Sub Menu2</a></li>
            </ul>
        </li>
        <li><a href="#">History</a></li>
        <li>
            <a href="#">Messages </a>           
            <ul class="submenu">
                <li><a href="#">Sub Menu1</a></li>
                <li><a href="#">Sub Menu2</a></li>
            </ul>
        </li>
        <li>
            <a href="#">Maintenance </a>            
            <ul class="submenu">
                <li><a href="#">Sub Menu1</a></li>
                <li><a href="#">Sub Menu2</a></li>
            </ul>
        </li>
    </ul>
</div>

<div class="content">
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh     euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim     veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea     commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse     molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et     iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te     feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil     imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem     insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes     demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam     processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam     littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis     per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum     clari, fiant sollemnes in futurum.</p>
</div>

<script type="text/javascript"         src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
</body>
</html>

CSS
html {
height: 100%;
}

body {
margin:0;
padding: 0;
height: 100%;
font-family: Arial;
font-size: 12px;
background: #f3f3f3;
}

*:focus {
border: none;
outline: none;
}

.content {
padding: 25px 25px 25px 250px;
}

.logo {
display: block;
text-indent: -9999px;
text-transform: capitalize;
background: url(../images/logo.png) no-repeat;
height: 90px;
}

.sidebar {
height: 100%;
min-height: 100%;
width: 213px;
background: url(../images/sidebarBg.png);
box-shadow: 0 0 8px #999;
float: left;
position: absolute;
top: 0;
}

/**  MENU  **/

ul {
margin: 0;
padding: 0;
list-style: none;
}

ul li {
background: url(../images/listBg.png) bottom no-repeat;
text-indent: 50px;
}

ul li a {
color: white;
display: block;
text-decoration: none;
padding: 21px;
width: 170px;
text-shadow: 1px 1px 0 #191b20;
position:relative;
}

ul li:hover {
background: url(../images/listBgGreen.png) no-repeat;
}

ul li a:hover, ul li:hover a {
color: white;
text-shadow: 1px 1px 0 #547829;
}

ul li a.dashboard {
background: url(../images/iconDashboard.png) 25px 50% no-repeat;
}

ul li a.pages {
background: url(../images/iconPages.png) 25px 50% no-repeat;
}

ul li a.media {
background: url(../images/iconMedia.png) 25px 50% no-repeat;
}

ul li a.history {
background: url(../images/iconHistory.png) 25px 50% no-repeat;
}

ul li a.messages {
background: url(../images/iconMessages.png) 25px 50% no-repeat;
}

ul li a.settings {
background: url(../images/iconSettings.png) 25px 50% no-repeat;
}

/**  SUB MENU  **/

ul li ul.submenu {
display: block;
z-index: 500;
top: 0;
}

ul li ul.submenu li {
background: url(../images/subMenuBg.png) bottom no-repeat;
}

ul li ul.submenu li a {
background: none;
padding: 13px;
width: 189px;
}

ul li ul.submenu li.last {
border-bottom: 1px solid #54575b;
background: url(../images/subMenuBg.png) top no-repeat;
}

ul li ul.submenu li.last a {
padding: 12px;
}

ul li:hover ul.submenu li a {
text-shadow: 1px 1px 0 black;
}

ul li ul.submenu li:hover {
background: url(../images/subMenuBgHover.png) bottom no-repeat;
}

/**  PIPS  **/

.pip {
display: block;
background: url(../images/pipBg.png);
padding: 3px 12px;
position: absolute;
top: 20px;
right: 25px;
color: white;
text-align: center;
text-indent: 0;
font-size: 10px;
border-top: 1px solid #1c1f23;
border-bottom: 1px solid #4c4f56;
border-radius: 30px;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
}

ul li:hover .pip {
background: url(../images/pipBgHover.png);
border-top: 1px solid #547829;
border-bottom: 1px solid #a4ce6b;

}

/**  SEARCH  **/

.search {
background: url(../images/listBg.png) no-repeat;
padding: 18px 15px;
width: 185px;
height: 29px;
}

.search input {
width: 125px;
padding: 7px 7px 7px 35px;
border:none;
margin: 0 0 0 10px;
background: #fff url(../images/search.png) 10px 50% no-repeat;
color: #808080;

box-shadow: inset 0 0 5px #ccc;
-webkit-box-shadow: inset 0 0 5px #ccc;
-moz-box-shadow: inset 0 0 5px #ccc;

border-radius: 30px;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
}

Custom.js

$(document).ready(function() {

// Adds title attributes and classnames to list items

$("ul li a:contains('History')").addClass("dashboard").attr('title', 'Dashboard');
$("ul li a:contains('Links')").addClass("pages").attr('title', 'Pages');
$("ul li a:contains('Media')").addClass("media").attr('title', 'Media');
$("ul li a:contains('Campaigns')").addClass("history").attr('title', 'History');
$("ul li a:contains('Messages')").addClass("messages").attr('title', 'Messages');
$("ul li a:contains('Maintenance')").addClass("settings").attr('title', 'Settings');

// Add class to last list item of submenu

$("ul.submenu li:last-child").addClass("last");

$("ul li:has(ul)").hover(function(){
    $(this).find("ul.submenu").stop("true", "true").slideDown(500);
    }, function(){
    $(this).find("ul.submenu").stop("true", "true").slideUp(500);
});

});

Hope this helps… Thanks

  • 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-13T23:07:29+00:00Added an answer on June 13, 2026 at 11:07 pm

    FIXED… “Display: none;” to the menu items

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

Sidebar

Related Questions

New to jquery. The desire is to show/hide horizontal menu bar items. I have
I have created an HTML page which uses simple CSS (no javascript) for menu
I have a range of items in an HTML drop-down menu that I need
I have HTML which includes scripts in following order <script src=../static/js/jquery.js type=text/javascript> <script src=../static/js/bootstrap.js
I have several HTML elements (buttons) that fire the same JQuery AJAX request. When
I have this html code that i want to edit with jQuery. Here is
I have an HTML (App) file that reads another HTML (data) file via jQuery.ajax()
I'm trying to learn html and jquery. My issue is that I have box
I have a <select> drop down that I'm inserting into my HTML via jQuery.
i have a css script for make jquery menu bar.. i want it can

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.