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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:20:16+00:00 2026-05-27T09:20:16+00:00

Is it possible to slide a div up (closing it) but not completely ?

  • 0

Is it possible to slide a div up (closing it) but not completely ?

I mean, slide up but leave a little of that div displayed, is that possible ?

Thanks in advance,
mem

  • 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-27T09:20:17+00:00Added an answer on May 27, 2026 at 9:20 am

    Something like this may work:

    $("#div").toggle(
    function(){
       $("#div").animate( { height:"500px" }, { queue:false, duration:500 });
    },
    function(){
       $("#div").animate( { height:"50px" }, { queue:false, duration:500 });
    });
    

    Instead of the 500px it can just be the original size of the div, and the 30px can be however much you want to show when it’s meant to be hidden.

    Update from the comments

    Here’s a fiddle showing that it can allow different heights if declared in a variable. And fading out after animation shouldn’t be a problem.

    http://jsfiddle.net/Skooljester/HdQSX/

    var divTest = $("#test").height();
    $("#test").toggle(
    function(){
       $("#test").animate({ height: divTest + 'px' }, { queue: false, duration: 500 });
    },
    function(){
       $("#test").animate({ height:'50px' }, { queue: false, duration: 500 });
    });
    #test {
      display: block;
      background: #FF0000;
      height: 500px;
      width: 300px;
    }
    <div id="test">Test</div>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to add a current class to the slide div that is
i use this scroller http://flowplayer.org/tools/demos/scrollable/vertical.html I notice that it slide 3 div.item ...is possible
Not sure if this is possible but I have a slideshow on my site
Is it possible to tween an element in percent in MooTools? var slide =
I can only think of a client-side solution using jQuery, but is it possible
Here is my question, Would it be possible, knowing that classic asp support server-side
I am trying to achieve a slide out from right effect on a div
I just found that it is possible to make a very simple slideshow by
So I have been trying to put a div side by side here but
Possible Duplicate: how-to-align-a-div-to-the-middle-of-the-page I need to show this Div tag allways center of the

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.