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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:35:45+00:00 2026-05-26T01:35:45+00:00

I am trying to make an overlay panel slide in and out from the

  • 0

I am trying to make an overlay panel slide in and out from the side of the page.
It works with Jquery 1.3, but with nothing after that.
I got it to slide out with 1.6.4, but it won’t slide back in.

I’m totally stumped,
I looked through all the Jquery Changelogs, and couldn’t figure it out.
Hopefully someone can help me,
Thanks.

here is my code…

HTML

<div id="sliderWrap">
    <div id="openCloseIdentifier"></div>
    <div id="slider">
      <div id="sliderContent">
                    </div>
      <div id="openCloseWrap">
            <a href="#" class="topMenuAction" id="topMenuImage">
                <img src="open.png" alt="open" />
            </a>
        </div>
    </div>
</div>

CSS

body {
margin: 0;
font-size:16px;
color: #000000;
font-family:Arial, Helvetica, sans-serif;
height: 100%;
}

#sliderWrap {
position:absolute;
top:0px;
left:0px;
height:100%;
width: auto;
}

#slider {
position: absolute;
background-color:black;
width: 600px;
height: 100%;
margin-left: -550px;
top:0;
left:0;
}

#slider img {
border: 0;
}

#sliderContent {
margin: 50px 0 0 50px;
position: absolute;
text-align:center;
background-color:#FFFFCC;
color:#333333;
font-weight:bold;
padding: 10px;
}

#header {
margin: 0 auto;
width: 600px;
background-color: #F0F0F0;
height: 200px;
padding: 10px;
}

#openCloseWrap {
position:absolute;
margin-top: auto;
margin-right: 0;
margin-bottom: auto;
margin-left: 600px;
}

Javascript

    $(document).ready(function() {
    $(".topMenuAction").click( function() {
        if ($("#openCloseIdentifier").is(":hidden")) {
            $("#slider").animate({ 
                marginLeft: "-550px"
                }, 500 );
            $("#topMenuImage").html('<img src="images/open.png" alt="open" />');
            $("#openCloseIdentifier").show();
        } else {
            $("#slider").animate({ 
                marginLeft: "1px"
                }, 500 );
            $("#topMenuImage").html('<img src="images/close.png" alt="close" />');
            $("#openCloseIdentifier").hide();
        }

    });  
});
  • 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-26T01:35:45+00:00Added an answer on May 26, 2026 at 1:35 am

    Try this method:

    $(document).ready(function() {
        $(".topMenuAction").click( function() {
            if ($("#openCloseIdentifier").hasClass("closed")) {
                $("#slider").animate({ 
                    marginLeft: "-550px"
                    }, 500 );
                $("#topMenuImage").html('<img src="images/open.png" alt="open" />');
                $("#openCloseIdentifier").removeClass("closed");
            } else {
                $("#slider").animate({ 
                    marginLeft: "1px"
                    }, 500 );
                $("#topMenuImage").html('<img src="images/close.png" alt="close" />');
                $("#openCloseIdentifier").addClass("closed");
            }
    
        });  
    });
    

    I prefer to use hasClass(), removeClass() and addClass() rather than is(":hidden").

    This works in the latest version of jquery – check it out.

    Forgot to mention

    You’ll also need to give your div a class of closed first:

    <div id="openCloseIdentifier" class="closed"></div>

    • 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 jQuery image overlay on div hover function, but I'm
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I am trying to make overlay over image while dragging but its also moving
I am trying to make a histogram of density values and overlay that with
I'm trying to figure out what's going on with my jquery animations and nothing
I'm trying to make something that looks like this, but I don't know how
I'm trying to make an overlay with thickbox... it only allows one line captions...
I'm trying make an entity with doctrine that has three associations with other entities
Trying to make the infamous checkall checkbox for dynamically created rows from a MySQL
Trying to make a small countdown timer in my app but it's not working.

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.