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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:31:42+00:00 2026-06-13T08:31:42+00:00

I am trying to create a side menu using jQuery in which the div

  • 0

I am trying to create a side menu using jQuery in which the div sideBarMinified will be hidden and hover and will display the sideBar. On mouseout, sideBar will be hidden and sideBarMinified will be displayed.

Here’s what I have :

HTML :

<div class="sideBarMinified">
    <div class="topClear">&nbsp;</div>
    <img src="images/miniLogo.png">
</div>
<div class="sideBar">
    <div class="topClearBig">&nbsp;</div>
    <img src="images/logo.png">
  <div class="menuClear"></div>
        <a href="#">Sample</a>
</div>

JS :

$(document).ready(function() {
    $(".sideBar").hide();
    $.backstretch(["images/cover.jpg"],{fade:2000});
    $(".sideBarMinified").mouseover(function(){
        $(".sideBar").show();
        $(".sideBarMinified").animate({left: "-=60px"}, 0 );
        $(".sideBar").animate({left: "+=272px"}, 500 );
    });
    $(".sideBar").mouseout(function() {
        $(".sideBar").animate({left: "-=272px"}, 500 );
        $(".sideBarMinified").animate({left: "+=60px"}, 700 );
    });
});

CSS :

div.sideBarMinified {
    position:absolute;
    left:0px;
    width:20px;
    height:100%;
    background-color:rgba(208,198,168,0.9);
    border-right:1px solid #333333;
    padding:0 15px 0 15px;
    z-index:999;
}
div.sideBar {
    position:absolute;
    left:-272px;
    width:272px;
    height:100%;
    background-color:rgba(208,198,168,0.9);
    padding:0 2px 0 45px;
    z-index:500;
}

The issue is when I hover on the <a> tag, the div sideBar is hidden and the div sideBarMinified is moving to the left. What is wrong with my code?

  • 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-13T08:31:43+00:00Added an answer on June 13, 2026 at 8:31 am

    I think this code should work for you.

    $(document).ready(function() {
    $(".sideBar").hide();
    $.backstretch(["images/cover.jpg"], {
        fade: 2000
    });
    $(".sideBarMinified").mouseover(function() {
        $(".sideBar").show();
        $(".sideBarMinified").animate({
            left: "-=60px"
        }, 0);
        $(".sideBar").animate({
            left: "+=272px"
        }, 500);
    
    
    });
    $(".sideBar").mouseleave(function() {
    
        $(".sideBar").animate({
            left: "-=272px"
        }, 500);
        $(".sideBarMinified").animate({
            left: "+=60px"
        }, 700);
    }); });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to create a client side editor which allows the end user
I am trying to create a two component UIPickerView, the left side of which
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I've been trying to find a way to display a side-menu generated from a
I am trying to create a vertical scroll menu in a sidebar of page
I'm trying to create two side-by-side div elements, but I found that having an
I'm trying to create a sidebar navigation menu that changes based on the current
I am trying to create a server-side solution which periodically pushes data to the
I am trying to create a list that will float on the right side
I'm trying to create a client-side api for a web control using the Prototype

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.