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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:34:45+00:00 2026-05-30T07:34:45+00:00

Yes, this sounds like a simple question, and it probably is. But when i

  • 0

Yes, this sounds like a simple question, and it probably is. But when i am implementing some of the solutions I an finding, not of them are working.

Basically I have a main content div and behind that div I have a small sidebar div that I would like to animate out from behind the main div when i click on an element. Seems simple? Well my head can’t quite code it right.. Also, jQuery noob here if we are going to be completely honest:

Here is the relevent HTML:

        <div id="clickme" style="z-index: 900; background-color:Black; width: 50px; height: 50px;"></div>

    <div id="superMain">
        <div id="leftFlyout"></div>
        <div class="main"><asp:ContentPlaceHolder ID="MainContent" runat="server"/></div>
        <div id="rightFlyout"></div>
    </div>    

Here is the CSS

#rightFlyout
{
width: 75px;
height: 400px;
background-color: Red;
position: absolute;
top: 0;
left: 875px;

}

#leftFlyout
{
float:left;
width: 75px;
height: 400px;
background-color: Red;
position: absolute;
top: 0;
left: 10px;

}

#superMain
{
position:relative;
}
.main
{
border-left:1px solid black;
border-right:1px solid black;
border-bottom:1px solid black;
padding: 0px;
padding-top: 10px;
margin: 0px auto;
min-height: 420px;
height:auto;
width: 940px;
background-color: White;
z-index: 10;
}

annnnnnd, the jQuery (the whole header in case i messed that up too somehow)

<head runat="server">
<script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
<script>
    $('#clickme').toggle(function () {

        $('#rightFlyout').animate({
            left: '+=200'
        }, 458, 'swing', function () {

            // Animation complete. CALLBACK?

        });

    }, function () {

        $('#leftFlyout').animate({
            left: '-=200'
        }, 458, 'swing', function () {

            // Animation complete. CALLBACK?

        });

    });
</script>
</head>

Please help! And if it is a ridiculously dumb mistake I am making, please mock relentlessly.

  • 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-30T07:34:46+00:00Added an answer on May 30, 2026 at 7:34 am

    You need to use the $(document).ready() handler:

    $(document).ready(function() {
        //Your code here
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes, this is as stupid a situation as it sounds like. Due to some
This sounds like a pretty easy question to answer but I haven't been able
So I realize this question sounds stupid (and yes I am using a dual
I know the Sales pitch answer is yes to this question, but is it
This sounds like homework, yes it is (of someone else) , I asked a
Yes, I know it sounds weird, but it doesn't, the question is why, and
So, yes, this is probably 1000th question on the subject. However, my question is
This question falls into the yes - this works, yes - this is ugly,
Yes, this is a programming-related question, if a little indirectly. For better or worse,
When I asked this question I got almost always a definite yes you should

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.