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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:03:41+00:00 2026-05-28T16:03:41+00:00

I grabbed this compact news reader from here Below is the code for animating

  • 0

I grabbed this compact news reader from here Below is the code for animating the ease in and ease out of the previews as the links are clicked on. I change the dimensions of the whole page from a height of 300 to 600. I did some googling and the animate part of jquery animates a CSS property of the element. So I worked from there. Thought I had things working but I didn’t so I thought I would start from scratch again.

Could any one explain this as it reads? For example, and I’m just guessing, “animate page element’s top css to -300px… the rest of the line I don’t understand.

Thank you for any help, harassment, or pointers.

$current.stop().animate({'top':'-300px'},600,'easeOutBack',function(){
                            $(this).css({'top':'310px'});

sdfadssf

            $items.each(function(i){
                var $item = $(this);
                $item.data('idx',i+1);

                $item.bind('click',function(){
                    var $this       = $(this);
                    $cn_list.find('.selected').removeClass('selected');
                    $this.addClass('selected');
                    var idx         = $(this).data('idx');
                    var $current    = $cn_preview.find('.cn_content:nth-child('+current+')');
                    var $next       = $cn_preview.find('.cn_content:nth-child('+idx+')');

                    if(idx > current){
                        $current.stop().animate({'top':'-300px'},600,'easeOutBack',function(){
                            $(this).css({'top':'310px'});
                        });
                        $next.css({'top':'310px'}).stop().animate({'top':'5px'},600,'easeOutBack');
                    }
                    else if(idx < current){
                        $current.stop().animate({'top':'310px'},600,'easeOutBack',function(){
                            $(this).css({'top':'310px'});
                        });
                        $next.css({'top':'-300px'}).stop().animate({'top':'5px'},600,'easeOutBack');
                    }
                    current = idx;
                });
            });
  • 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-28T16:03:42+00:00Added an answer on May 28, 2026 at 4:03 pm

    Ill explain;

    $current. //the element you are on
        stop(). //stop all running animations
        animate( //start a new animation
            {'top':'-300px'}, //animate till this element's top style is -300px
            600, //the animation will take 600ms
            'easeOutBack', //it will use the EaseOutBack easing function
            function(){ //callback, that gets called as soon as the animation finishes
                $(this).css({'top':'310px'}); //set the element's top style to 310px
            }
        );
    

    so in other words, this function doesn’t do anything very smart. It animates and in the end it jumps to a different place anyway..
    regardless, hope I helped 🙂

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

Sidebar

Related Questions

I grabbed this code form JCarousel and just trying to understand these lines below.
So I have this ruby code I grabbed from wikipedia and I modified a
I've grabbed some Scala CSV parsing code from here: Use Scala parser combinator to
I grabbed a database of the zip codes and their langitudes/latitudes, etc from this
Grabbed this from a sample: protected override ObjectContext CreateDataSource() { NorthwindContext nw = new
I grabbed this code form some book I've bumped on the InternetS... sm: new
I just grabbed vs2010 release from msdn and I wanted to find out if
I grabbed this snippet from another question: <script type='text/javascript' > $(document).ready(function () { $(div.content
Right now I successfully grabbed the full element from an HTML page with this:
I have a delimiter string like this: 2,3 which is grabbed from a listbox

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.