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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:12:36+00:00 2026-06-02T04:12:36+00:00

I would appreciate some help and insight on a solution to this problem. I

  • 0

I would appreciate some help and insight on a solution to this problem. I am developing a website with a header div of initial visible height of 180px. The header div is 340px in total height. When a user clicks on a link, I am needing the header div to slide down to reveal the rest (top) of itself. So, mathematically speaking, when a user loads the page, the bottom 180px of the 340px header div will be displayed. When they click the link, the rest of the div slides down to reveal its top 160px. When a user clicks the same link, the header div slides back up so only the bottom 180px is displayed again.

I have tried getting this to work, but am not sure what I am doing wrong. My initial thinking was to use slideToggle() (hide/show), but I can’t seem to get that to work. Others on StackOverflow suggest animate(), but I don’t know how to get that to work either.

I have searched on StackOverflow and seem to find a lot of questions regarding showing and hiding an entire div, but the problem is this completely shows and hides the divs. I am needing my div to slide down to reveal the top hidden portion and then slide back up to it’s original resting position (-160px offscreen).

Any help would greatly be appreciated! I have included my starter code below:

HTML:

<div id="header">
    <a href="#header" class="toggle">Click me to reveal the top half of this div</a>
</div>

JQuery:

$(document).ready(function(){
    $('.toggle').click(function(){
        $('#header').slideToggle("slow");
        return false;
    });
});

CSS:

#header {
    position: fixed;  /*I would like this div to always be fixed to the top of the browser window*/
    top: 160px;
    left: 0;
    width: 100%;
    height: 340px;
    z-index: 10;
}
  • 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-02T04:12:38+00:00Added an answer on June 2, 2026 at 4:12 am

    Try this JSFiddle, please.

    http://jsfiddle.net/WFxLJ/3/

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

Sidebar

Related Questions

I have a problem finding references to this subject and would appreciate some help.
I'm pretty new to Python programming and would appreciate some help to a problem
I would appreciate some help with the following issue - you can see this
Would appreciate some insight isolating this, some semi-repeatable crashes in an iPhone app of
I'm having a little struggle on this one and would appreciate some help. In
I've been stuck on this for quite a while and would appreciate some help
I would appreciate some help with something I working on and have not done
I would appreciate some help with an UPDATE statement. I want to update tblOrderHead
I would appreciate some help on creating the proper SQL to retrieve only one
I would really appreciate it if some of you could help optimize my tables,

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.