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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:23:32+00:00 2026-06-13T15:23:32+00:00

Have been doing a codeacademy course http://www.codecademy.com/ru/courses/javascript-lesson-951/0?curriculum_id=4fc3018f74258b0003001f0f#!/exercises/6 – making a vertical sliding pannel. The

  • 0

Have been doing a codeacademy course http://www.codecademy.com/ru/courses/javascript-lesson-951/0?curriculum_id=4fc3018f74258b0003001f0f#!/exercises/6 – making a vertical sliding pannel.
The problem is that these codeacademy guys didn’t explain how to make the pannel not only slide down, but also slide back up. I tried to do it myself, but didnt achieve anything. Please help.

$(document).ready(function(){
ANIMATION_LENGTH = 400;
$panel = $("#panel");
$tab = $("#tab");
var $isShown;
$tab.click(function($isShown){
    alert($isShown);
    if ($isShown == false)
    {$isShown = true;}
    else if ($isShown == true)
    {$isShown = false;}
    var newTop = $isShown == false ? "-180px" : "0px";
    var lit = {"top": newTop};
    $panel.animate(lit, ANIMATION_LENGTH);
    return $isShown         
});});

CSS

#panel {
    padding: 50px;
    height: 100px;
    width: 500px;
    text-align: center;
    font-size: 24px;
    font-family: Arial;
    font-weight: bold;
    background: #EEE;
    cursor: pointer;
    position:absolute;
    top: -180px;

    -webkit-border-bottom-left-radius: 10px;
}

#tab {
    position:absolute;
    bottom: -25px;
    right: 0px;
    padding: 10px;
    background: #EEE;
    font-size: 16px;
    text-decoration: none;
    -webkit-border-bottom-right-radius: 10px;
    -webkit-border-bottom-left-radius: 10px;
}

HTMl

<html>
<head>
    <title>Result</title>
    <link type="text/css" rel="stylesheet" href="panel.css" />
    <script type="text/javascript" src="panel.js"></script>
</head>

<body>
    <div id="panel">
        Awesome hidden sliding pane
        <a href="#panel" id="tab">Click to show</a>
    </div>
</body>

  • 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-13T15:23:33+00:00Added an answer on June 13, 2026 at 3:23 pm

    This is how I would approach the problem:

    http://jsfiddle.net/du8z8/3/

    HTML

    <div class="con">
        <div id="tab">Click to Show</div>
        <div id="panel" style="display:none;">
            <p>Awesome hidden sliding pane</p>
            <div id="close">Close</div>
        </div>    
    </div>
    

    JQUERY

    $("#tab").click(function() {
        $("#tab").toggle();
        $("#panel").slideToggle('slow');
    });    
    
    $("#close").click(function() {
        $("#tab").toggle();
        $("#panel").slideToggle('slow');        
    });
    

    CSS

        .con { position:relative; }
    
        #tab {
            position:absolute;
            top:0px;
            right:20px;
            padding: 10px;
            background: #EEE;
            font-size: 16px;
            text-decoration: none;
            -webkit-border-bottom-right-radius: 10px;
            -webkit-border-bottom-left-radius: 10px;
            cursor:pointer;
        }
    
        #close { padding:10px 0 0 0; font-size:0.750em; }
    
        #panel {
            padding:50px;
            width:100%;
            text-align:center;
            font-size:1em;
            font-family:Arial;
            font-weight:bold;
            background:#EEE;
            cursor:pointer;
            -webkit-border-bottom-left-radius:10px;
        }
    
    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been doing a crash course of C# OOP and am curious to
I have been doing some research on test driven development and find it pretty
I have been doing active development in C# for several years now. I primarily
I have been doing TDD and was using it more as unit testing than
I have been doing PHP stuff for almost one year and I have never
I have been doing a lot of unit testing lately with mocking. The one
I have been doing some research for using MSMQ. Following 2 gave me fundamental
I have been doing some x86 programming in Windows with NASM and I have
I have been doing a lot of research on the internet with regards to
So I have been doing some research into getting my UTF8 to print correctly.

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.