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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:42:36+00:00 2026-05-25T23:42:36+00:00

I was trying to make a list that updates from the top. Every time

  • 0

I was trying to make a list that updates from the top. Every time when new list item is inserted, old items will be moved down together smoothly

So firstly I generate list item every time I click

function addItem(){ 
 $('#public').prepend('<li><div id="item' + i + '" class="tile"></div></li>');
 $('#item' + i).fadeIn();                                        
 i ++}

then I tried to animate() them down by using the code below:

 $('.tile').animate({top:42},500);

Strangely, only the last element will animate down smoothly, other elements will still be squashed down. And there is always 42px white between.

  • 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-25T23:42:37+00:00Added an answer on May 25, 2026 at 11:42 pm

    I don’t see where the variable i gets initialized? I mean, does it increment since you don’t pass the variable in the method or retrieve the current value from somewhere. I don’t think you need to use the variable anyhow by the way. You can use jQuery to get all siblings and than call the animate on that list of items (of course with an if statement that skips the latest added item).

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

Sidebar

Related Questions

I am trying to make a method that will go through a list of
I am trying to make a view that edits a list of predefined models.
I'm trying to make a function in SML that takes a list and an
I'm trying to make a function in standard ml that takes a list of
I am trying to get a list together of tools/libraries that make me more
I'm trying to make a list containing different objects. List<Object> list = new ArrayList<Object>();
I'm trying to make an Applescript that takes a list of names and makes
I'm trying to make a simple link that will toggle my status attribute in
I am trying to make a list box where I have complete control over
I'm trying to make unordered list of variables in var1 occurs twice and var2

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.