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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:48:37+00:00 2026-05-15T20:48:37+00:00

I have an issue where I have a div that is positioned absoutely and

  • 0

I have an issue where I have a div that is positioned absoutely and I want to animate it off the page upwards (I’m animating a person jumping off the screen).

However, I need the element to be bottom: 0, but when I want the animation to finish I want the image to have top: -600px.

When I write

$("#jumper").animate({ 
    top: "-600px"
}, 2000, 'easeInBack' );   

it sets top top to 0 and then starts the animation.

Perhaps there is a way to get the ypos of the element and set top with jQuery.css() on window load?

What should I do here?

  • 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-15T20:48:38+00:00Added an answer on May 15, 2026 at 8:48 pm

    How about just animating the bottom property? You could get the height of the document, then add 600 to it.

    http://jsfiddle.net/kavY4/

    var height = $(document).height();
    
    $("#jumper").animate({ 
        bottom: height + 600
    }, 2000, 'easeInBack' ); ​
    

    Otherwise, you run into browser specific issues where the top is calculated to be auto, and the animation tries to start from that position (which ends up being 0, I guess).

    To make that work you would have to get the top position of #jumper and set the top property to that value manually before you animate.

    var top = $('#jumper').offset().top;
    
    $("#jumper").css({top:top, bottom:'auto'})
    .animate({ 
        top: -600
    }, 2000, 'easeInBack' ); 
    

    EDIT: The second example required bottom to be set to auto as well.

    http://jsfiddle.net/kavY4/1/

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

Sidebar

Related Questions

I have something similar to below: <div style=float:left;margin-left:5px;>Test</div> The issue is that I need
The issue I have a <div> on a page which is initially hidden with
I have a div that is fixed to the side of my web page.
I have a little issue concerning an animation-effect which loads a certain div into
I have the following code, its simplified to demonstrate the issue. The menuholder div
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have an issue with an open source C++ project that I have been
I have implemented a chat script which requires an absolutely positioned DIV to be
I am having an issue positioning a div that I've styled using CSS in
I have a div that contains a paragraph, a list and a right-floated div.

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.