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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:15:05+00:00 2026-05-25T17:15:05+00:00

How can I achieve height animation in reverse? Instead of the typical animation starting

  • 0

How can I achieve height animation in reverse?

Instead of the typical animation starting from the top and working its way down, how can I have it start the animation from the bottom of the element and work its way up towards the top of the element?

The event is triggered by a#link-1, the animation takes place in div#line-1.

This is my code: It doesn’t appear to be working. :-/

HTML

<div id="pageContainer">
    <div id="line-1"></div>
    <a id="link-1" title="" href="#">Link 1</a>
</div><!-- end #pageContainer -->

CSS

#pageContainer{
    position: relative;
    margin: 0px 0px 200px 0px;
    min-height: 748px;
    height: 748px;
    background: url('../img/sprite.png') bottom center no-repeat;   
}
a#link-1{
    position: absolute;
    top: 686px;
    left: 36px;
    text-align: center;
    display: block;
    width: 76px;
    height: 24px;
    line-height: 24px;
    z-index: 20;
}
div#line-1{
    position: absolute;
    top: 4px;
    left: 30px;
    width: 340px;
    height: 687px;
    background: url('../img/sprite.png') 0px 0px no-repeat; 
}

JS

// Initially hide                      
$("div#line-1").hide();
// Activate Line 1
$('a#link-1').click(function() {
    $('div#line-1').animate({
    opacity: 0.25,
    height: 'toggle'
    }, 5000, function() {
// Animation complete.
    });
});
  • 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-25T17:15:06+00:00Added an answer on May 25, 2026 at 5:15 pm

    You div and your a tags have the same ID. They must have unique IDs.

    $('a#line-1').click(function() {
        $('div#line-1').animate({
    

    needs to be something like:

    $('a#line-1').click(function() {
        $('div#unique_id').animate({
    

    Example Fix

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

Sidebar

Related Questions

How can I achieve this view with CSS: ------------------TITLE or TITLE------------------ I have <div
How can i achieve this layout alt text http://img195.imageshack.us/img195/1870/screenshot20091212at151.jpg (now its done with tables)
Is it possible to achieve line-height consistency in all browsers? I have attached an
I am trying to change the height of UIPageControl how I can achieve that?
I'm having trouble getting a td to have some text at its top and
if we implement java interpreter in hardware then how we can achieve architecture neutrality
I want to hide framelayout dynmically in android, How I can achieve this.
How can I achieve the following with the Ajax Control Toolkit MaskedEdit extender? Letter
How can I achieve the following in oracle without creating a stored procedure? Data
How can i achieve event handling for dynamic controls in VB6? Any ideas?

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.